Given a character array, str[] of consisting of N lowercase alphabets, and an integer array, arr[] consisting of numbers in the range [0, N –… Read More

# Category Archives: Queue

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[] consisitng 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

Given a Linked List of even number of nodes, the task is to generate a new Linked List such that it contains the maximum difference… Read More

Given two arrays A[] and B[] consisting of N integers, the task is to update array A[] by assigning every array element A[i] to a… Read More