dsa3 min read
All Nodes Distance K in Binary Tree
Find all nodes at distance K from a target node by building parent pointers then doing BFS.
Read →
webcoderspeed.com
1276 articles
Find all nodes at distance K from a target node by building parent pointers then doing BFS.
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.