Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Engineering Concepts (http://www.go4expert.com/forums/engineering-concepts/)
-   -   CS engg. question (http://www.go4expert.com/forums/cs-engg-question-t27523/)

aryan123 3Jan2012 17:22

CS engg. question
 
In a complete k-ary tree, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is:
(a) nk
(b) (n 1) k+ 1
(c) n( k 1) + 1
(d) n(k 1)

Answer (c) according to the books.



please help me to solve this..

aryan123 3Jan2012 18:27

Re: CS engg. question
 
Hey i get it now.. i was not including the root node among internal nodes, thats why i had confusion.


All times are GMT +5.5. The time now is 01:43.