Skip to content

Files

Latest commit

 

History

History

05.BinaryTree

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Binary Tree

Must Know

  • How to traverse a binary tree
  • Space complexity of recursive algorithms

##Tricks Recursion! Recursion!

  • EPI 10.1 Test If A Binary Tree Is Height Balanced
  • EPI 10.2 Test If A Binary Tree Is Symmetric
  • EPI 10.3 Compute The Lowest Common Ancestor In A Binary Tree
  • EPI 10.4 Compute The LCA When Nodes Have Parent Pointers
  • EPI 10.5 Sum The Root To Leaf Path
  • EPI 10.6 Find A Root To Leaf Path With Specified Sum

Recursion to Iteration

  • EPI 10.7 Implement An Inorder Traversal Without Recursion
  • EPI 10.8 Implement A Preorder Traversal Without Recursion
  • Leetcode 145. Binary Tree Postorder Traversal

Tree Construction

  • Leetcode 108. Convert Sorted Array to Binary Search Tree
  • Leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal

##Porblem set ####EPI

  • 10.1 Test If A Binary Tree Is Height Balanced
  • 10.2 Test If A Binary Tree Is Symmetric
  • 10.3 Compute The Lowest Common Ancestor In A Binary Tree
  • 10.4 Compute The LCA When Nodes Have Parent Pointers
  • 10.5 Sum The Root To Leaf Path
  • 10.6 Find A Root To Leaf Path With Specified Sum
  • 10.7 Implement An Inorder Traversal Without Recursion
  • 10.8 Implement A Preorder Traversal Without Recursion
  • 10.9 Compute The Kth Node In An Inorder Traversal
  • 10.10 Compute the Successor
  • 10.11 Implement An Inorder Traversal With O(1) Space
  • 10.13 Reconstruct A Binary Tree From A Preorder Traversal With Markers
  • 10.14 Form A LinkedList From The Leaves of A Binary Tree
  • 10.15 Compute The Exterior of A Binary Tree
  • 10.16 Compute The Right Sibling Tree
  • 10.17 Implement Locking In A Binary Tree

####CCTI

  • 4.5 Validate BST
  • 4.10 Check Subtree
  • 4.11 Random Node

####Leetcode

  • 100. Same Tree
  • 111. Minimum Depth of Binary Tree
  • 104. Maximum Depth of Binary Tree
  • 113. Path Sum II
  • 437. Path Sum III
  • 129. Sum Root to Leaf Numbers
  • 404. Sum of Left Leaves
  • 222. Count Complete Tree Nodes
  • 108. Convert Sorted Array to Binary Search Tree
  • 116. Populating Next Right Pointers in Each Node
  • 106. Construct Binary Tree from Inorder and Postorder Traversal
  • 114. Flatten Binary Tree to Linked List
  • 337. House Robber III
  • 102. Binary Tree Level Order Traversal
  • 199. Binary Tree Right Side View
  • 103. Binary Tree Zigzag Level Order Traversal
  • 145. Binary Tree Iterative Postorder Traversal
  • 297. Serialize and Deserialize Binary Tree

####GeeksforGeeks