← Amazon questions

Sum of Heights of Nodes in Binary Tree

Filed under Amazon

Calculate the sum of the heights of all nodes in a binary tree, where the height of a node is the number of edges on the longest path from the node to a leaf.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.