Binary Tree Node Bounds
Computer Mathematics
Medium
2 views
Problem Description
Given height h (root at height 0), print min and max nodes in a binary tree.
Input Format
One integer h.
Output Format
Two integers min max.
Official Solution
Min nodes = h+1 (a chain). Max nodes = 2^(h+1)-1.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!