Yelp interview question

Find the k-lowest elements of an unsorted array.

Interview Answers

Anonymous

11 Aug 2016

Do not use min Heap! It will take O(nlogk) time which is not what they want. They want O(n). SO use QuickSelect!

Anonymous

5 June 2016

Use min-heap.