Frage im Vorstellungsgespräch bei Amazon

(Phone question) Write an algorithm in your preferred language (C++, Ruby, Java) that takes in a random array and returns the top 3 maximum values.

Antwort im Vorstellungsgespräch

Anonym

31. Jan. 2016

Priority queue may be ? retrieve the max element each time using O(1) complexity