Heap

Правка en1, от rahul_1234, 2017-05-15 17:31:06

Hi,

Given a max-heap represented as an array, return the kth largest element without modifying the heap. Pleaae provide an algorithm which is most optimised. There are few answers on net but I guess most are following a particular structure of heap, so I want a correct answer.

Теги heap, #interview, range, optimisation

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский rahul_1234 2017-05-15 17:31:06 292 Initial revision (published)