For a complete binary tree with n nodes, how many nodes are leaf nodes?

One of the answers in our powerpoint says it is n/2 leaves, but I am seeing another answer which says (n+1)/2. I was wondering which one is correct if any, and why?

Read more here:

Content Attribution

This content was originally published by Amit Jain at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: