## Max of All Subarrays of Size k Using Max Heap in C++

This problem, also referred to as the “sliding window maximum” problem, can be efficiently solved using heaps. We’ve already discussed an O(n) solution.

## Comparing Order Statistics Algorithm and Min Heap for Finding the Kth Smallest Element

Both methods provide effective solutions for finding the kth smallest element in a list of numbers. Understanding their strengths and trade-offs will help you select the most suitable approach for your use case.

## Restaurant Rating Solution (Heap) | CodeChef [Medium]

Chef has opened up a new restaurant. He picks out the positive reviews and posts it on the website of the restaurant. A review is considered to be positive if it is among the top one-third of the total reviews when they are sorted by their rating.

## C++ Standard Template Library (STL) – [Heap]

The Heap data structure is an array that can be viewed as a complete Binary Tree. Each node in the tree corresponds to an element of the array A[].
In this post we will learn about, how to build min/max Heaps using STL.

## Heap Data structure | Heap Sort in C++

The Heapsort algorithm uses Heap data structure to sort an array in O(nlogn) time complexity. It starts by calling Build-Max-Heap.

## C++ Standard Template Library (STL) – [Priority queue]

In the last post we discussed about C++ Standard Template Library (STL) Linked List. In this post we will learn about STL Priority queue and using it as Max/Min Heap. A priority queue is a data structure for maintaining a set of elements having an associated value.

## Huffman Code Explained using Heap [Introduction to Algorithms book]

Huffman codes are a widely used technique for compressing data. Huffman codes is a greedy algorithm to build up an optimal way of representing each character as a binary string. Suppose we have a 10,000 character data file that we wish to store. And we observe a character ‘a’ occurs very frequently.

## How to find k nearest neighbours of a given point from a set of points in a plane?

Let’s given n points in a plane. We’ve to find k nearest neighbours of a given point ‘p’ from the given n points.