## Multi Source Shortest Path in Unweighted Graph

Suppose there are n towns connected by m bidirectional roads. There are s towns among them with a police station. We want to find out… Read More »

- Introduction to Data Structures | 10 most commonly used Data Structures
- Rearrange numbers in an array such that no two adjacent numbers are same
- Burn the binary tree starting from the target node
- Count number of ways to reach destination in a Maze using BFS
- Sort the Queue using Recursion
- Reverse tree path using Queue
- Minimum operations required to make every element greater than or equal to K
- Reversing a Queue using another Queue
- Find the maximum cost path from the bottom-left corner to the top-right corner
- Density of Binary Tree using Level Order Traversal
- Find the first N pure numbers
- Print all the nodes except the leftmost node in every level of the given binary tree
- Count of numbers in the range [L, R] which satisfy the given conditions
- Duplicate subtree in Binary Tree | SET 2
- Python | Queue using Doubly Linked List
- Print odd positioned nodes of even levels in level order of the given binary tree
- Find the number on the card that remains in the end after performing the given operations
- Print odd positioned nodes of odd levels in level order of the given binary tree
- Queries to find the left-most given type integer in a binary array
- Print even positioned nodes of odd levels in level order of the given binary tree
- Queue in Python

Suppose there are n towns connected by m bidirectional roads. There are s towns among them with a police station. We want to find out… Read More »

Given a queue of integers of even length, rearrange the elements by interleaving the first half of the queue with the second half of the… Read More »

Given a Queue consisting of first n natural numbers (in random order). The task is to check whether the given Queue elements can be arranged… Read More »

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 »

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 a queue, write a recursive function to reverse it. Standard operations allowed : enqueue(x) : Add an item x to rear of queue. dequeue()… 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 queue with random elements, we need to sort it. We are not allowed to use extra space. The operations allowed on queue are… Read More »

Prerequisite : Priority Queue, Comparator Priority Queue is like a regular queue, but each element has a “priority” associated with it. In a priority queue,… Read More »

Share a queue among three threads A, B, C as per given norms : Thread A generates random integers and pushes them into a shared… Read More »

Given Nodes with their priority, implement a priority queue using doubly linked list. Prerequisite : Priority Queue Operations on Priority Queue : push(): This function… Read More »

Given a tree, print the level order traversal in sorted order. Examples : Input : 7 / \ 6 5 / \ / \ 4… Read More »

Implement Priority Queue using Linked Lists. Operations on Priority Queue : push(): This function is used to insert a new data into the queue. pop():… Read More »

Given a Binary tree, the task is to print its all level in sorted order Examples: Input : 7 / \ 6 5 / \… Read More »