# Category Archives: Heap (adsbygoogle = window.adsbygoogle || []).push({});

## UHG(United Health Group) Interview Experience | Set 4 (On-Campus)

Eligibility criteria : 70 % OR 7 CGPA and above. Round 1.1 30 aptitude questions in 45 minutes .paper was bit tricky and was at… Read More »

## Heap in C++ STL | make_heap(), push_heap(), pop_heap(), sort_heap(), is_heap, is_heap_until()

Heap data structure can be implemented in a range using STL which allows faster input into heap and retrieval of a number always results in… Read More »

## Merge K sorted linked lists | Set 1

Given K sorted linked lists of size N each, merge them and print the sorted output. Example: Input: k = 3, n = 4 list1… Read More »

## Convert min Heap to max Heap

Given array representation of min Heap, convert it to max Heap in O(n) time. Example : Input: arr[] = [3 5 9 6 8 20… Read More »

## K-ary Heap

Prerequisite – Binary Heap K-ary heaps are a generalization of binary heap(K=2) in which each node have K children instead of 2. Just like binary… Read More »

## Overview of Data Structures | Set 2 (Binary Tree, BST, Heap and Hash)

We have discussed Overview of Array, Linked List, Queue and Stack. In this article following Data Structures are discussed. 5. Binary Tree 6. Binary Search… Read More »

## Check if a given Binary Tree is Heap

Given a binary tree, we need to check it has heap property or not, Binary tree need to fulfill the following two conditions for being… Read More »

## Fibonacci Heap | Set 1 (Introduction)

Heaps are mainly used for implementing priority queue. We have discussed below heaps in previous posts. Binary Heap Binomial Heap In terms of Time Complexity,… Read More »

## How to check if a given array represents a Binary Heap?

Given an array, how to check if the given array represents a Binary Max-Heap. Examples: Input: arr[] = {90, 15, 10, 7, 12, 2} Output:… Read More »

## Why is Binary Heap Preferred over BST for Priority Queue?

A typical Priority Queue requires following operations to be efficient. Get Top Priority Element (Get minimum or maximum) Insert an element Remove top priority element… Read More »

## K’th largest element in a stream

Given an infinite stream of integers, find the k’th largest element at any point of time. Example: Input: stream[] = {10, 20, 11, 70, 50,… Read More »

## Where is Heap Sort used practically?

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 »

## Intuit Interview Experience | Set 7 (For 3.5 Years Experienced)

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 »

## Intuit Interview Experience | Set 6

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 Interview | Set 2 (On-Campus)

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 »