Spotify interview question

Kth greatest element

Interview Answers

Anonymous

26 Feb 2018

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

Anonymous

27 Feb 2019

Minheap with size k. Time comp: nlogk