If the height of a binary tree is 54, how many null pointers are there as children?
If the height of a binary tree is 54, how many null pointers are there as children? Correct Answer 255
Depth-first search (DFS) algorithm of a binary tree, is a trivial example of short-circuiting. We can have a standard recursive algorithm in case of DFS. Now, a perfect binary tree of height h has 2h+1 Null pointers as children. h = 54 254+1 255.
মোঃ আরিফুল ইসলাম
Feb 20, 2025