Skip to content

Category Archives: Queue

Given a Binary Tree, the task is to replace the value of each node with the sum of all the nodes present in the same… Read More
Given a Binary Tree consisting of 0s and 1s only, the task is to print the count of levels in the Binary Tree in which… Read More
Given a character array, str[] consisting of N lowercase alphabets, and an integer array, arr[] consisting of numbers in the range [0, N – 1].… Read More
Given a Binary Tree, the task is to find the most frequent subtree sum that can be obtained by considering every node of the given… Read More
Linear Queue: A Linear Queue is generally referred to as Queue. It is a linear data structure that follows the FIFO (First In First Out)… Read More
Given a Binary tree consisting of N nodes with values in the range [1, N], the task is to find the distance from the root… Read More
Given a positive integer N, representing the count of players playing the game and an array of strings arr[], consisting of the numeric strings made… Read More
Queue: A Queue is a linear data structure that follows a First In First Out (FIFO) order in which the operations are performed. It is… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the Kth smallest element in the array using… Read More
Prerequisite: Queue in Python Here given a queue and our task is to dump the queue into list or array. We are to see two… Read More
Given two arrays arr[] and jumps[] consisting of N positive integers, the task for each array element arr[i] is to find the minimum number of… Read More
Given string str, the task is to find the minimum count of characters that need to be deleted from the string such that the frequency… Read More
Given an integer N, a binary string S and an array W[]. S denotes the sequence of N * 2 persons entering the hall, where… Read More
Given an N-ary tree and an element X, the task is to print the siblings of the node with value X. Two nodes are considered… Read More