Yahoo interview question

Give the top ten elements of the given array

Interview Answer

Anonymous

10 Mar 2015

I did by using heap and priority queue as its time complexity is nlogk and he asked me can you do it selection sort. I did and asked the difference.