Meta interview question

How would you quickly find the kth smallest number in an unsorted array?

Interview Answers

Anonymous

9 Jan 2016

Using heap is the right track

5

Anonymous

17 Jan 2016

int findKthSmallestt(int[] a, int k) { Arrays.sort(a); return a[k-1]; }

3

Anonymous

21 Jan 2016

Quick Select. O(n) time complexity.

1

Anonymous

18 Dec 2015

quicksort and the traverse?