Oh!
sorry
my idea for internal nodes=leaves-1  is only for binary tree

like at level 4 total leaves 2^4=32
so internal nodes=32-1=31
also can be checked as 16+8+4+2+1=31

there must be a shortcut for ternary also...

by the way brijesh thanks for correcting me.
so total internal nodes will be 40 as stated by brijesh

On Wed, Aug 10, 2011 at 3:08 AM, Brijesh Upadhyay <
[email protected]> wrote:

> General approach would be , get the no of levels first by log 28 /log 3 , =
> 4(use ceiling)...and now 3^0+3^1+3^2+3^3 = 40 will be no of internal nodes..
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/OyhD3tQ5uPgJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to