A quick reference guide for heap data structures, algorithms, and common interview patterns. Covers max/min heaps, heapsort, priority queues, and practical implementations in Java and Python...
I recently came across a simple telephonic interview problem. The problem was to sort an array recursively. But even numbers need to be placed before odd numbers. At first glance it was obvious that it was a simple case of implementation of merge sort...
The other day I stumble upon the question to find the kth 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...