# Category: Queue

## Print Right View of a Binary Tree

Given a binary tree, write an efficient algorithm to print right view of given binary tree.   Get great deals at Amazon

## Traverse the given directory using BFS and DFS in Java

In this post, we will see how to traverse the given directory and list out all files present in it and all its sub-directories.

## Find maximum width of given binary tree

Given a binary tree, write an efficient algorithm to compute maximum width of it.

## Invert Binary Tree | Recursive and Iterative solution

Given a binary tree, write an efficient algorithm to invert binary tree.

## Find shortest distance of every cell from landmine in a Maze

Given a Maze in the form of a rectangular matrix, filled with either O, X or M, where O represents an open cell, X represents a blocked cell and M represents landmines in the maze, we need to find shortest distance of every open cell in the maze from its nearest mine.

## Print corner nodes of every level in binary tree

Given a binary tree, print corner nodes of every level in it.

## Print Diagonal Traversal of Binary Tree

Given a binary tree, print all nodes for each diagonal having negative slope (\). Assume that the left and right child of a node makes 45 degree angle with the parent.

## Check if given binary tree is complete binary tree or not

Given a binary tree, check if it is a complete binary tree or not.

## Find next node in same level for given node in a binary tree

Given a binary tree and a node in it, write an efficient algorithm to find its next node in same level as given node.

## Print Left View of Binary Tree

Given a binary tree, write an efficient algorithm to print left view of binary tree.

## Print all nodes of a perfect binary tree in specific order

Given a perfect binary tree, write an efficient algorithm to print all nodes of it in specific order. We need to print nodes of every level in alternating left and right.

## Reverse Level Order Traversal of Binary Tree

Given a binary tree, print its nodes level by level in reverse order. i.e. all nodes present at last level should be printed first followed by nodes of second-last level and so on.. All nodes for any level should be printed from left to right.