Back to Question

Count Complete Tree Nodes

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

Click "Start Speaking" and answer the question naturally.