Skip to content

Category Archives: Queue

Given an integer K and an array arr[] containing N integers, the task is to find the sum and product of K smallest and K… Read More
Given a non-decreasing array arr[] and an integer K, the task is to remove K elements from the array such that maximum difference between adjacent… Read More
Given a Binary Tree, the task is to print all prime levels of this tree.  Any level of a Binary tree is said to be… Read More
Queue in STL are a type of container adaptors which operate in a first in first out (FIFO) type of arrangement where elements are inserted… Read More
Given a Binary Tree, the task is to print all palindromic levels of this tree.  Palindrome Level Any level of a Binary tree is said… Read More
Pre-requisites: Java Collection Framework. 1. What is the Output of following Java Program?Attention reader! Don’t stop learning now. Get hold of all the important DSA… Read More
Priority Queue in STL Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest… Read More
Given a binary tree, the task is to print all the nodes except the rightmost in every level of the tree. The root is considered… Read More
Given two queues A and B, each of size N, the task is to find the minimum time taken to execute the tasks in A… Read More
Given a binary string str consisting of only 0’s and 1’s. The following two operations can be performed on it:   One digit can delete another… Read More
Given an array arr[] of size N and a number K, the task is to find the length of the smallest subsequence such that the… Read More
Given an array arr[] of size N, the task is to print the arrangement of the array such that upon performing the following operations on… Read More
Given a Binary Tree, the task is to print spiral order traversal of the given tree. For below tree, the function should print 1, 2,… Read More
Given an N * M matrix mat[][] consisting of lower case characters, the task is to find the minimum cost to reach from the cell… Read More
Given a string S of length N consisting of lower case character, the task is to find the minimum cost to reach from index i… Read More

Start Your Coding Journey Now!