## Print Nodes in Top View of Binary Tree

Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. Given a binary tree, print… 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
- Minimum steps required to reach the end of a matrix | Set 2
- 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
- Smallest multiple of N formed using the given set of digits
- Find the first N pure numbers
- LRU Approximation (Second Chance Algorithm)
- Print all the nodes except the leftmost node in every level of the given binary tree
- Print the final string when minimum value strings get concatenated in every operation
- Print even positioned nodes of even levels in level order 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

Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. Given a binary tree, print… Read More »

Deque or Double Ended Queue is a generalized version of Queue data structure that allows insert and delete at both ends. Operations on Deque: Mainly… Read More »

We have discussed efficient implementation of k stack in an array. In this post, same for queue is discussed. Following is the detailed problem statement.… Read More »

There are given n ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal… Read More »

Given a number n, write a function that generates and prints all binary numbers with decimal values from 1 to n. Examples: Input: n =… Read More »

Priority Queue is an extension of queue with following properties. Every item has a priority associated with it. An element with high priority is dequeued… Read More »

In the previous post, we introduced Queue and discussed array implementation. In this post, linked list implementation is discussed. The following two main operations must… Read More »

Like Stack, Queue is a linear structure which follows a particular order in which the operations are performed. The order is First In First Out (FIFO).… Read More »

Given a Binary tree and a key in the binary tree, find the node right to the given key. If there is no node on… Read More »

Given a stream of characters, find the first non-repeating character from stream. You need to tell the first non-repeating character in O(1) time at any… Read More »

There are two conventions to define the height of a Binary Tree 1) Number of nodes on the longest path from the root to the… Read More »

Given Linked List Representation of Complete Binary Tree, construct the Binary tree. A complete binary tree can be represented in an array in the following… Read More »

Suppose there is a circle. There are n petrol pumps on that circle. You are given two sets of data. The amount of petrol that… Read More »

The problem is opposite of this post. We are given a Queue data structure that supports standard operations like enqueue() and dequeue(). We need to… Read More »

Given an array of non-negative integers. Find the largest multiple of 3 that can be formed from array elements. For example, if the input array… Read More »