Although QuickSort works better in practice, the advantage of HeapSort worst case upper bound of O(nLogn). MergeSort also has upper bound as O(nLogn) and works… Read More
Category Archives: Heap
1st Round : (2 hrs) 1. Implement LRU Cache, 2. Implement your own Blocking Queue. 3. Questions on Collections , a. How AtomicInteger works b.… Read More
Experience – 1.8years Round-1:(Technical-1:10 min) 1. Introduce yourself. 2. Deep discussion on the current project which I’m working on.(project high level architecture, questions on design,… Read More
Accolite came to our campus for recruitment. First Round Written Test: 30 MCQs in which question related to DS Networking OS Unix commands DBMS. Questions… Read More
Given an array and a number K where K is smaller than the size of the array. Find the K’th smallest element in the given… Read More
The main application of Binary Heap is as implement a priority queue. Binomial Heap is an extension of Binary Heap that provides faster union or… Read More
A Binary Heap is a complete Binary Tree which is used to store data efficiently to get the max or min element based on its… Read More
Given an n x n matrix, where every row and column is sorted in non-decreasing order. Print all elements of the matrix in sorted order.… Read More
Given are N ropes of different lengths, the task is to connect these ropes into one rope with minimum cost, such that the cost to… Read More
Given an n x n matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the given 2D… Read More
VMWare interview for MTS-2 position. I Telephonic round 1. Given an array of strings. Find the maximum prefix among all the strings. Ans: First told… Read More
Given K sorted arrays of size N each, merge them and print the sorted output. Examples: Input: K = 3, N = 4, arr = {… Read More
First of all, a very very big thanks to whole team of geeks for geeks. It is because of them only that I was able… Read More
Pre-requisite: What is Heap Sort? Heapsort is a comparison-based sorting technique based on a Binary Heap data structure. It is similar to selection sort where… Read More
Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the… Read More