Back to Questions

Count Complete Tree Nodes

123.4K viewsAsked at Microsoft
Medium

Question Explain

Given the root of a complete binary tree, return the number of nodes in the tree. The solution must be faster than $O(n)$, utilizing the complete tree properties.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Count Complete Tree Nodes - Interview Question