Is it possible to compute how many nodes have arbitrary binary tree? The leaf count and the depth of every leaf are known (it is Huffman tree actually).
I need it in order to be able to allocate needed memory for the tree before building it actually and to avoid memory re-allocations later.