Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - InOrder Traversal -
- - PreOrder Traversal -
- - PostOrder Traversal -
- - LevelOrder Traversal -
- - Finding size of binary tree -
- - Finding sum of all elements in binary tree -
- - Finding height of binary tree -
- - Finding maximum element in a binary tree -
- - Finding deepest node of binary tree -
- - Finding number of leaves in binary tree -
- - Finding number of full nodes in a binary tree -
- - Finding number of half nodes in a binary tree -
- - Program to determine if two binary trees are identical -
- - Program to convert binary tree in to its mirror -
- - Program to determine if two binary trees are mirrors -
- - Program to print all ancestors of node in binary tree -
- - Finding diameter of binary tree
- - Given binary tree, print all root to leaf paths -
- - Finding the level with maximum sum in a binary tree -
- - ***Checking existence of path with given sum in a binary tree
- - Finding LCA of two nodes in Binary tree
- - ***Zigzag Tree Traversal
- - Program to delete a tree
- - Program to search an element
- - Given two traversal sequences, can we construct binary tree uniquely -------
- - ***Find the maximum sum leaf to root path in binary tree
- - ***Find the maximum path sum between two leaves of a binary tree
- - Check if given tree is subtree of another binary tree
- - Construct tree from given InOrder and PreOrder traversals
- - Link: http://www.geeksforgeeks.org/construct-tree-from-given-inorder-and-preorder-traversal/
- - Construct a tree given level order and InOrder traversals
- - Link: http://www.geeksforgeeks.org/construct-tree-inorder-level-order-traversals/
- - Program to delete an element from binary tree
- - Finding vertical sum of binary tree
- - ***The Great Tree-List Recursion Problem
- - Link: http://cslibrary.stanford.edu/109/TreeListRecursion.html
- - Problem Statement:
- Write a recursive function treeToList(Node root) that takes an ordered binary tree and rearranges
- the internal pointers to make a circular doubly linked list out of the tree nodes. The "previous"
- pointers should be stored in the "small" field and the "next" pointers should be stored in the
- "large" field. The list should be arranged so that the nodes are in increasing order.
- Return the head pointer to the new list. The operation can be done in O(n) time --
- essentially operating on each node once
Advertisement
Add Comment
Please, Sign In to add comment