## Heap Sort – Java Implementation

What is Heap Sort?? Heap sort is comparison based sorting algorithm. Heap sort is considered as improved selection sort, it divides the input into sorted and unsorted region. The improvement from selection sort is...

Skip to content# Category: Priority Queue

## Heap Sort – Java Implementation

## Dijkstra’s – Shortest Path Algorithm (SPT) – Adjacency List and Priority Queue – Java Implementation

## Prim’s – Minimum Spanning Tree (MST) |using Adjacency List and Priority Queue with decrease key

## Shortest Range in K-sorted Lists

## Generate Maximum revenue by selling K tickets from N windows

## Find the Kth Smallest/Largest Element in an Array

## Priority Queue in Data Structure

## Merge K Sorted Arrays

## Binary Min-Max Heap Implementation

@tutorialhorizon

What is Heap Sort?? Heap sort is comparison based sorting algorithm. Heap sort is considered as improved selection sort, it divides the input into sorted and unsorted region. The improvement from selection sort is...

Earlier we have seen what Dijkstra’s algorithm is and how it works. In this article, we will see its implementation using the adjacency list and Priority Queue. brief: What is Dijkstra’s algorithm? Dijkstra algorithm is...

Earlier we have seen what is Prim’s algorithm is and how it works. In this article we will see its implementation using adjacency list and Priority Queue. We strongly recommend to read – prim’s...

Objective: You have k lists of sorted integers. Find the smallest range that includes at least one number from each of the k lists. This is very nice and tricky solution, This problem was asked...

Objective: Given ‘N’ windows where each window contains certain number of tickets at each window. Price of a ticket is equal to number of tickets remaining at that window. Write an algorithm to sell...

Objective: Given an array of integers. find the Kth Smallest/largest element in the array. Example: int[] A = { 1, 2, 10, 20, 40, 32, 44, 51, 6 }; K=4. 4th smallest element in...

Earlier in we have seen Min-Heap and Max-Heap Implementation. Priority Queue is its built-in implementation in Java. In this article we will see how to perform Min-Heap and Max-Heap using Priority Queue. Brief: A...

Objective: Given k sorted array, write an algorithm to merge Them into One sorted array. Example : int[][] A = new int[5][]; A[0] = new int[] { 1, 5, 8, 9 }; A[1] =...

A binary heap is a heap data structure created using a binary tree. binary tree has two rules – Binary Heap has to be a complete binary tree at all levels except the last...

%d bloggers like this: