title: Counting number of nodes in a complete binary tree
body: <p>I want to count the number of nodes in a <a href="https://en.wikipedia.org/wiki/Binary_tree#Types_of_binary_trees" rel="noreferrer">Complete Binary tree</a> but all I can think of is traversing the entire tree. This will be a O(n) algorithm where n is the number of nodes in the tree. what could be the most efficient algorithm to achieve this?</p>