Freshworks interview question

Finding the kth largest element in an array

Interview Answers

Anonymous

Aug 22, 2017

Heap

1

Anonymous

Dec 13, 2017

sort the array in descending order.Array[k] of the sorted array gives the answer