employer cover photo
employer logo
employer logo

Palantir Technologies

Is this your company?

Palantir Technologies Interview Question

Given a max-heap, how do I find the top k items?

Interview Answer

Anonymous

Apr 18, 2013

Simply remove the root node k times, takes k*log(n) time. Haha I blurted out log(k), derpin' since '93