dsa2 min read
Path Sum IV
Sum all root-to-leaf path sums in a tree encoded as 3-digit integers using a hashmap to decode tree structure.
Read →
webcoderspeed.com
1276 articles
Sum all root-to-leaf path sums in a tree encoded as 3-digit integers using a hashmap to decode tree structure.
Find k values closest to target in a BST using two in-order iterators (forward and reverse) with a two-pointer merge.
Transform a binary tree so every right child becomes a sibling and left child becomes parent using iterative rotation.
Find the inorder successor of a node in a BST when you have access to parent pointers.
Find second minimum value in a special binary tree where root is min and each node equals min of its children.