dsa2 min read
Sum Root to Leaf Numbers
Compute the total sum of all root-to-leaf numbers formed by concatenating digits along each path.
Read →
1575 articles
Compute the total sum of all root-to-leaf numbers formed by concatenating digits along each path.
Find the maximum width of a binary tree where width is measured from leftmost to rightmost non-null node per level.
Count nodes where no node on the root-to-node path has a value greater than the node itself.
Replace each node value with the sum of all values greater than or equal to it using reverse in-order traversal.
Find all duplicate subtrees by serializing each subtree and using a hash map to detect duplicates.