dsa1 min read
Same Tree — Structural and Value Comparison
Check if two binary trees are identical by recursively comparing structure and node values.
Read →
1575 articles
Check if two binary trees are identical by recursively comparing structure and node values.
Check if a binary tree is height-balanced by computing subtree heights and returning -1 early on imbalance.
Merge two binary trees by adding overlapping node values recursively, using existing nodes where possible.
Sum all BST values in [low, high] using BST property to prune entire subtrees outside the range.
Find a node with given value in a BST by navigating left or right based on the BST property.