Given a binary search tree and a key, your task to reverse path of the binary tree.Prerequisite : Reverse path of Binary tree Examples : … Read More

# Tag Archives: cpp-queue

Given an N-ary tree, find the number of siblings of given node x. Assume that x exists in the given n-ary tree. Example : Input… Read More

Given a binary tree, print the level order traversal in such a way that first two levels are printed from left to right, next two… Read More

Given an unweighted graph, a source, and a destination, we need to find the shortest path from source to destination in the graph in the… Read More

Given a queue, write a recursive function to reverse it. Standard operations allowed : enqueue(x) : Add an item x to rear of queue. dequeue() : Remove an… Read More

We are given an integer N. We need to write a program to find the least positive integer X made up of only digits 9’s… Read More

Given a binary tree containing n nodes. The problem is to find and print the largest value present in each level.Examples: Input : 1 /… Read More

Queue is also an abstract data type or a linear data structure, which follows a particular order in which the operations are performed. The order… Read More

Queue is also an abstract data type or a linear data structure, which follows a particular order in which the operations are performed. The order… Read More

Priority queues are a type of container adaptors, specifically designed such that the first element of the queue is the greatest of all elements in… Read More

Priority queues are a type of container adaptors, specifically designed such that the first element of the queue is the greatest of all elements in… Read More

Priority queues are a type of container adaptors, specifically designed such that the first element of the queue is the greatest of all elements in… Read More

Given a binary tree containing n nodes. The problem is to check whether the given binary tree is a full binary tree or not. A… Read More