algorithm - Is Quicksort "adaptive" and "online"? -


that say, quicksort perform better when given sorted list? don't see why case, perhaps don't understand algorithm.

also, can quicksort "keep going" whilst add new data list while sorting? seems me algorithm needs full set of data @ beginning "work".

does quicksort perform better when given sorted list?

no, in fact way it's taught (use first element pivot) sorted (or sorted) list worst-case. using middle or random element pivot can mitigate this, however.

can quicksort "keep going" whilst add new data list while sorting?

no, intuition correct, need entire data set start.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -