Yelp Interview Question

Find the k-lowest elements of an unsorted array.

Interview Answers

Anonymous

Aug 11, 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

Jun 5, 2016

Use min-heap.