Spotify Interview Question

Kth greatest element

Interview Answers

Anonymous

Feb 26, 2018

sorting, but they wanted something faster, with a heap (which I forgot about) that can be built in O(n) time.

Anonymous

Feb 27, 2019

Minheap with size k. Time comp: nlogk