## Max Heap in Java

A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to the values in the… Read More »

## Double ended priority queue

A double ended priority queue supports operations of both max heap (a max priority queue) and min heap (a min priority queue). The following operations… Read More »

## PriorityQueue spliterator() method in Java

The spliterator() method of PriorityQueue returns a Spliterator the same elements as PriorityQueue.The returned Spliterator is late-binding and fail-fast Spliterator. A late-binding Spliterator binds to… Read More »

## Priority Queue in Python

Priority Queue is an extension of the queue with following properties. 1) An element with high priority is dequeued before an element with low priority.… Read More »

## Kth smallest element after every insertion

Given an infinite stream of integers, find the k’th largest element at any point of time. It may be assumed that 1 <= k <=… Read More »

## Merge k sorted arrays | Set 2 (Different Sized Arrays)

Given k sorted arrays of possibly different sizes, merge them and print the sorted output. Examples: Input: k = 3 arr[][] = { {1, 3},… Read More »

## Minimum increment/decrement to make array non-Increasing

Given an array a, your task is to convert it into a non-increasing form such that we can either increment or decrement the array value… Read More »

## Implement PriorityQueue through Comparator in Java

Prerequisite : Priority Queue, Comparator Priority Queue is like a regular queue, but each element has a “priority” associated with it. In a priority queue,… Read More »

## Priority Queue using doubly linked list

Given Nodes with their priority, implement a priority queue using doubly linked list. Prerequisite : Priority Queue Operations on Priority Queue : push(): This function… Read More »

## Print Binary Tree levels in sorted order | Set 2 (Using set)

Given a tree, print the level order traversal in sorted order. Examples : Input : 7 / \ 6 5 / \ / \ 4… Read More »

## Priority Queue using Linked List

Implement Priority Queue using Linked Lists. Operations on Priority Queue : push(): This function is used to insert a new data into the queue. pop():… Read More »

## Print Binary Tree levels in sorted order

Given a Binary tree, the task is to print its all level in sorted order Examples: Input : 7 / \ 6 5 / \… Read More »

## priority_queue::swap() in C++ STL

Priority queues are a type of container adaptors, specifically designed such that the first element of the queue is the greatest of all elements in… Read More »

## Implementation of Priority Queue in Javascript

Priority Queue is an extension of Queue having some properties as follows: Each element of the priority queue has an property associated with it. Elements… Read More »

## How to implement stack using priority queue or heap?

How to Implement stack using a priority queue(using min heap)?. Asked In: Microsoft, Adobe. Recommended: Please try your approach on {IDE} first, before moving on… Read More »