Binary Tree Problems

  1. Introduction & Creation of Binary Tree
  2. Inorder, PreOrder & PostOrder Traversals in Binary Tree
  3. Get Sum of all Nodes in Binary Tree
  4. Get difference of values at Even & Odd level
  5. Get Number of Nodes in a Binary Tree
  6. Get number of Leaf Nodes in Binary Tree
  7. Get Height of a Binary Tree/Node
  8. Print elements at given level in Binary Tree
  9. Print elements in Level order (Using Recursion)
  10. Level Order traversal without Recursion (Using Queue)
  11. Level Order Traversal Line by Line Without Recursion (Using Single Queue)
  12. Print Reverse Level order Traversal (Using Recursion)
  13. Reverse Level Order Traversal without using recursion 
  14. Print Left view of Binary tree
  15. Print Right View of Binary Tree
  16. Print InOrder Traversal without using recursion
  17. Print PreOrder Traversal without using recursion
  18. PostOrder Traversal without using recursion
  19. Convert a binary tree to its Mirror Tree
  20. Delete the Binary Tree
  21. Check if two binary trees are identical
  22. Get Level of a Given Node
  23. Print Top View of Binary Tree
  24. Print Bottom View of Binary Tree
  25. Print Boundary Nodes In Binary Tree
  26. Print Vertical Order of Binary Tree
  27. Get Vertical Sum of Binary Tree
  28. Get Sum of elements Level wise of Binary Tree
  29. Search an element in Binary Tree
  30. Print Level Order Traversal in Spiral form in Binary Tree
  31. Print elements between any two given level
  32. Get Maximum width of Binary Tree
  33. Check if two trees are mirror to each other
  34. Check if Two Trees are Mirror Structure to each other
  35. Check if Two Binary Trees have same Structure
  36. Check if  Binary Tree is Foldable Tree
  37. Check if two Binary Trees are Isomorphic
  38. Get Width of a Level in Binary Tree
  39. Create Binary tree from InOrder & Preorder
  40. Get Height of Binary Tree in Iterative Manner
  41. Get Diameter of Binary Tree | Get Max distance between any two leaf nodes
  42. Check if given Binary Tree is Height Balanced Tree
  43. Check If Root to Leaf Sum matches for Given Sum in Binary Tree
  44. Print root to leaf every path in Binary Tree
  45. Get Max Sum from Root To Leaf in Binary Tree
  46. Get Sum of all numbers formed from Root to Leaf Path in Binary Tree
  47. Find Maximum or Minimum in Binary Tree
  48. Find Min Height of Binary Tree
  49. Get Sum of all Leaf Nodes in Binary Tree
  50. Get Sum of all Left Leaf Nodes in Binary Tree
  51. Get Minimum distance to Leaf from Root in Binary Tree
  52. Check if all Leaf Nodes are at same level in Binary Tree
  53. Get deepest Left Leaf Node in Binary Tree
  54. Find depth of Odd level Leaf node in Binary Tree
  55. Remove all Nodes which lies on path with less than K length from Root to Leaf
  56. Remove all nodes which don’t lie in any path from root to leaf with sum>= k
  57. Find if the sequence is present as a root-to-leaf path in the given tree
  58. Print ancestors of a given value in Binary Tree
  59. Get Parent of a given value in Binary Tree
  60. Get Sibling node of a given value in Binary Tree
  61. Check if given two nodes are siblings to each other in Binary Tree
  62. Check if given two nodes are cousin to each other in Binary Tree
  63. Find LCA (Lowest Common ancestor) in Binary Tree
  64. Find distance b/w two nodes in Binary Tree
  65. Print all nodes at k distance from given node in Binary Tree
  66. Get Average of all nodes in Binary Tree
  67. Get closest leaf node distance from a given value in Binary Tree
  68. Serialize & Deserialize a Binary tree
  69. Check if given Binary Tree is BST
  70. Convert Binary Tree to Doubly Linked List (BST to DLL)
  71. Connect ‘next’ pointer to it’s Inorder Successor in Binary Tree
  72. Get Right node of given value in Binary Tree
  73. Connect Nodes at same level with ‘next’ pointer in Binary Tree
  74. Connect ‘next’ pointer to Level Order Successor Node
  75. Check If Parent contains sum of both children
  76. Check If given Binary Tree is Sum Tree
  77. Get Diagonal Sum in Binary Tree

4 thoughts on “Binary Tree”

  1. Thank you so much Sir for all wonderful coding question that you have posted on your youtube channel! I will forever be grateful to you and I’m sure many others would be too. Please continue posting such amazing explanations of coding question. We all will keep supporting you and we will make sure that your channel becomes way more popular and well known to millions of people all around the world! Thank you again!

Leave a Reply

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