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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -