employer cover photo
employer logo
employer logo

Palantir Technologies

Is this your company?

Palantir Technologies Interview Question

How to compute top k numbers in an array?

Interview Answers

Anonymous

Jun 5, 2012

using min heap.. create min heap of fist 5 elements form array while(i

Anonymous

Sep 17, 2013

But yes, selection algorithm has better running time complexity

Anonymous

Sep 17, 2013

using min-heap, complexity is O(N * logK)