Skip to content

Tag Archives: cpp-priority-queue

Priority Queue: A priority queue is a special type of queue in which each element is assigned a priority value. And elements are served based… Read More
Given an integer M and a sorted integer array arr[] of length N containing 1 and N-1 prime numbers, each appearing just once, the task… Read More
Given an integer N and an array arr[] of M pairs of type (Ai, Bi), the task is to generate the lexicographically smallest possible permutation… Read More
Given an integer target which represents the total distance to be covered by a car on a straight road. Given another array, station[] of size… Read More
Priority Queue Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More
Priority Queue Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More
Priority Queues Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More
Priority Queue Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More
Given an integer N, representing the number of workers, an array speed[ ], where speed[i] represents the speed of the ith worker, and an array efficiency[… Read More
Given an array arr[] consisting of N integers, the task is to find the length of the longest subsequence such that the prefix sum at… Read More
Given an integer N, representing number of projects, two arrays P[] and C[], consisting of N integers, and two integers W and K where, W… Read More
Given two arrays apples[] and days[] representing the count of apples an apple tree produces and the number of days these apples are edible from… Read More
STL Priority Queue is the implementation of Heap Data Structure. By default, it’s a max heap, and can be easily for primitive data types. There… Read More
Given an array arr[] of size N, consisting of 0s initially, and a positive integer K, the task is to print the array elements by… Read More
Given an array arr[] of size N, the task is to find the smallest possible remaining array element by repeatedly removing a pair, say (arr[i],… Read More

Start Your Coding Journey Now!