Interview preparation course

Binary Trees

Binary trees are a very important data structure and help you understand recursive functions well, which you can use in other problems. Most of the problems in binary trees are recursive and use one or the other traversal of the tree.
In this section, we learn more about trees, recursion function, and how traversals can be used to solve most of the problems on trees.

Problems set

  1. Binary tree and Binary Search Trees
  2. Traversals
  3. Mirror a tree/Delete a tree
  4. Replace node with the sum of children
  5. Is Identical tree
  6. Is it a BST
  7. Is it a subtree
  8. Print all paths
  9. Path sum problem
  10. Level order traversal
  11. Zigzag traversal
  12. Right view of a tree
  13. Lowest common ancestor.
  14. Diameter of tree
  15. Construct a binary tree from inorder and preorder traversals.

Leave a Reply

Your email address will not be published. Required fields are marked *