For a better experience on RandomWits, enable JavaScript in your browser.
RandomWits
life is too short for a diary
Tags
Books
Quotes
Travel
Resources
Tools
Contact
About
On This Page
Posts Tagged: max-heap
Find kth largest element in an array
The other day I stumble upon the question to find the k
th
largest element in the array. At first glance, I thought the solution was trivial. But later I thought that there are multiple ways to achieve efficient solution...
Continue reading →
algorithm
ruby
heap
max-heap
projects