DSA - Tree

Tricks

ProblemSet

  • binary tree inorder traversal
  • unique binary search tree II
  • unique binary search tree
  • validate binary search tree
  • recover binary search tree
  • same tree
  • symmetric tree
  • binary tree level order traversal
  • binary tree zigzag level order traversal
  • maximum depth of binary tree
  • construct binary tree from preorder and inorder traversal
  • construct binary tree from inorder and postorder traversal
  • binary tree level order traversal II
  • convert sorted array to binary search tree
  • balanced binary tree
  • minimum depth of bianry tree
  • path sum
  • path sum II
  • flatten bianry tree to linked list
  • binary tree maximum path sum
  • sum root to leaf numbers
  • binary tree preorder traversal
  • binary tree postorder traversal
  • binary search tree iterator
  • binary tree right side view
  • count complete tree nodes
  • invert binary tree
  • kth smallest element in a BST
  • lowest common ancestor of a BST
  • lowest common ancestor of a BT
  • binary tree paths
  • serialize and deserialize binary tree
  • house robber III
  • sum of left leaves
  • path sum III
  • most frequent subtree sum
  • find bottom left tree value
  • find largest value in each tree row
  • minimum absolute difference in BST
  • convert BST to greater tree
  • binary tree tilt
  • subtree of another tree
  • n-ary tree preorder traversal
  • add one row to tree
  • average of levels in BT
  • two sum IV - input is a bst
  • maximum width of a BT
  • trim a BST
  • redundant connection
  • redundant connection II
  • minimum distance between BST nodes
  • sum of distances in tree
  • all nodes distance K in BT
  • leaf-similar trees
  • increasing order search tree
  • range sum of BST
  • binary tree cameras
  • flip binary tree to match preorder traversal
  • distribute coins in BT
  • vertical order traversal of a BT
  • cousins in BT
  • maximum difference between node and ancestor
  • recover a tree from preorder traversal
  • binary search tree to greater sum tree
  • delete nodes and return forest
  • lowest common ancestor of deepest leaves
  • binary tree coloring game
  • deepest leaves sum
  • all elements in two BSTs
  • throne inheritance
Licensed under CC BY-NC-SA 4.0
Get Things Done
Built with Hugo
Theme Stack designed by Jimmy