Binary heap - Find number of nodes at a height
问题 I have been struggling with this for several hours now, and I can't seem to find the answers here either. (there are many posts about Binary Heap, but I did not this particular problem). The problem is: For a Binary Heap with 1492 nodes, the number of nodes of height two is _ 187 _. I understand that with 1492 nodes, the binary heap has the depth log(1492)/log(2) = 10 height two should have 2^(10-2) nodes which should be 256 Why is the answer 187? Thank you 回答1: In case someone needs to know.