-
Notifications
You must be signed in to change notification settings - Fork 0
Trees
Varma Penmetsa edited this page Sep 5, 2018
·
15 revisions
Traversal:
- BFS Traversal
- DFS Traversal
- InOrder Iterative
- PreOrder Iterative
- PostOrder Iterative
- InOrder/PreOrder Morris Traversal
- Print LevelOrder LineByLine
- Reverse LevelOrder Traversal
- Diameter of Binary Tree (To Do)
Construction:
- Construct a tree given in-order and preorder traversal
- Construct a binary tree give preorder and postorder
- Construct a tree from In-order and Level order traversals (To Do)
- Construct Complete binary from a Linked List
- Construct Special Binary Tree from given In-order traversal
- Construct Binary Tree from String with bracket representation (To Do)
- Convert a given Binary Tree to Doubly Linked List (To Do)
Checking:
- Check for Children Sum Property in a Binary Tree
- Check if a given Binary Tree is SumTree
- Check sum of Covered and Uncovered nodes of Binary Tree (Revise Sum method)
- Check if two nodes are cousins in a Binary Tree (Revise getParent method)
- Check if removing an edge can divide a Binary Tree in two halves (Revise size method)
- Check if a binary tree is subtree of another binary tree(Revise isSame function)
- Check if Binary Tree is Full Binary Tree
- Check if Binary Tree is Perfect Binary Tree(Revise depth function)
- Print all root to leaf paths with there relative positions (To Do)
- Check if there is a root to leaf path with given sequence
- Check if root to leaf path sum equal to a given number
- Given a binary tree, print out all of its root-to-leaf paths one per line (To Do)
- Lowest Common Ancestor in a Binary Tree
- Find the distance between two keys in a binary tree (Revise distanceFromRoot2Node)
- Print Binary from Side, Up, Bottom, Right view (To Do)
- Print Binary Tree in Spiral Order (To Do)