Find postorder traversal of BST from preorder traversal

Problem Statement The problem “Find postorder traversal of BST from preorder traversal” states that you are given preorder traversal of a binary search tree. Then using the given input find the postorder traversal. Example preorder traversal sequence: 5 2 1 3 4 7 6 8 9 1 4 3 2 …

Read moreFind postorder traversal of BST from preorder traversal

Boundary Traversal of binary tree

Problem Statement The problem “Boundary Traversal of binary tree” states that you are given a binary tree. Now you need to print the boundary view of a binary tree. Here boundary traversal means that all the nodes are shown as the boundary of the tree. The nodes are seen from …

Read moreBoundary Traversal of binary tree

Diagonal Traversal of Binary Tree

Problem Statement The problem “Diagonal Traversal of Binary Tree” states that you are given a binary tree and now you need to find the diagonal view for the given tree. When we see a tree from the top-right direction. The nodes which are visible to us is the diagonal view …

Read moreDiagonal Traversal of Binary Tree