Binary Tree Data Structure

‘Recent Articles’ on Binary Tree
Topic :

Introduction :

Traversals :

Construction & Conversion :

  1. Construct Tree from given Inorder and Preorder traversals
  2. Construct a tree from Inorder and Level order traversals
  3. Construct Complete Binary Tree from its Linked List Representation
  4. Construct Full Binary Tree from given preorder and postorder traversals
  5. Construct a special tree from given preorder traversal
  6. Construct tree from ancestor matrix
  7. Construct Ancestor Matrix from a Given Binary Tree
  8. Construct Special Binary Tree from given Inorder traversal
  9. Construct Binary Tree from given Parent Array representation
  10. Construct a Binary Tree from Postorder and Inorder
  11. Create a Doubly Linked List from a Ternary Tree
  12. Creating a tree with Left-Child Right-Sibling Representation
  13. Convert a given Binary Tree to Doubly Linked List | Set 1
  14. Convert a given Binary Tree to Doubly Linked List | Set 2
  15. Convert a given Binary Tree to Doubly Linked List | Set 3
  16. Convert a given Binary Tree to Doubly Linked List | Set 4
  17. Convert an arbitrary Binary Tree to a tree that holds Children Sum Property
  18. Convert a Binary Tree to Threaded binary tree | Set 1 (Using Queue)
  19. Convert a Binary Tree to Threaded binary tree | Set 2 (Efficient)
  20. Convert left-right representation of a binary tree to down-right
  21. Convert a given tree to its Sum Tree
  22. Change a Binary Tree so that every node stores sum of all nodes in left subtree
  23. Write an Efficient Function to Convert a Binary Tree into its Mirror Tree
  24. Convert a normal BST to Balanced BST
  25. Convert a Binary Tree into Doubly Linked List in spiral fashion
  26. Convert a Binary Tree to a Circular Doubly Link List
  27. Convert a tree to forest of even nodes
  28. Convert a given Binary tree to a tree that holds Logical AND property
  29. Convert Ternary Expression to a Binary Tree

Longest Common Ancestor :

Misc :

  1. Write a program to Delete a Tree
  2. Write a Program to Find the Maximum Depth or Height of a Tree
  3. Write Code to Determine if Two Trees are Identical
  4. Write a program to Calculate Size of a tree
  5. Root to leaf path sum equal to a given number
  6. How to determine if a binary tree is height-balanced?
  7. Diameter of a Binary Tree
  8. Check for Children Sum Property in a Binary Tree
  9. Program to count leaf nodes in a binary tree
  10. The Great Tree-List Recursion Problem
  11. Given a binary tree, print out all of its root-to-leaf paths one per line
  12. Populate Inorder Successor for all nodes
  13. Connect nodes at same level using constant extra space
  14. Connect nodes at same level
  15. Check if a binary tree is subtree of another binary tree | Set 1
  16. Check if a given Binary Tree is SumTree
  17. Print Ancestors of a given node in Binary Tree
  18. Get Level of a node in a Binary Tree
  19. Print nodes at k distance from root
  20. Foldable Binary Trees
  21. Maximum width of a binary tree
  22. Double Tree
  23. Given a binary tree, print all root-to-leaf paths
  24. Linked complete binary tree & its creation
  25. Check whether a given Binary Tree is Complete or not | Set 1 (Iterative Solution)
  26. Find the maximum sum leaf to root path in a Binary Tree
  27. Vertical Sum in a given Binary Tree | Set 1
  28. Sum of all the numbers that are formed from root to leaf paths
  29. Find next right node of a given key
  30. Deepest left leaf node in a binary tree
  31. Extract Leaves of a Binary Tree in a Doubly Linked List
  32. Remove all nodes which don’t lie in any path with sum>= k
  33. Print Left View of a Binary Tree
  34. Check if all leaves are at same level
  35. Find depth of the deepest odd level leaf node
  36. Difference between sums of odd level and even level nodes of a Binary Tree
  37. Custom Tree Problem
  38. Iterative Method to find Height of Binary Tree
  39. Tree Isomorphism Problem
  40. Check if a binary tree is subtree of another binary tree | Set 2
  41. Find the maximum path sum between two leaves of a binary tree
  42. Threaded Binary Tree
  43. Reverse alternate levels of a perfect binary tree
  44. Print Right View of a Binary Tree
  45. Print all nodes at distance k from a given node
  46. Find distance between two given keys of a Binary Tree
  47. Print all nodes that don’t have sibling
  48. Check if a given Binary Tree is height balanced like a Red-Black Tree
  49. Print all nodes that are at distance k from a leaf node
  50. Find the closest leaf in a Binary Tree
  51. Diagonal Sum of a Binary Tree
  52. Bottom View of a Binary Tree
  53. Print Nodes in Top View of Binary Tree
  54. Serialize and Deserialize an N-ary Tree
  55. Check if a given graph is tree or not
  56. Print nodes between two given level numbers of a binary tree
  57. Find Height of Binary Tree represented by Parent array
  58. Minimum no. of iterations to pass information to all nodes in the tree
  59. Check if two nodes are cousins in a Binary Tree
  60. Find Minimum Depth of a Binary Tree
  61. Maximum Path Sum in a Binary Tree
  62. Expression Tree
  63. Iterative Search for a key ‘x’ in Binary Tree
  64. Find maximum (or minimum) in Binary Tree
  65. Find sum of all left leaves in a given Binary Tree
  66. Remove nodes on root to leaf paths of length < K
  67. More >>

Quick Links :

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

Company Wise Coding Practice    Topic Wise Coding Practice