문제

I am wondering why QuickSelect is supposed to be such a good performing algorithm for finding an arbitrary element out of an n-sized, unsorted set. I mean, when you go through all elements one by one, until you find the desired one it took O(n) comparisions - That's as much the quickselect's best case and much easier.

Am I missing something essential about this? Is there a case the QiuckSelect is performing better, than linear search?

도움이 되었습니까?

해결책

QuickSelect in Average is better in finding the k-th smallest (largest) number(item) in not sorted array

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top