Domanda di colloquio di Yelp

Find the k-lowest elements of an unsorted array.

Risposte di colloquio

Anonimo

11 ago 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!

Anonimo

5 giu 2016

Use min-heap.