What is the size of the given K-ary tree?

Category: QuestionsWhat is the size of the given K-ary tree?
Editor">Editor Staff asked 1 month ago

What is the size of the given K-ary tree?
 
(a) 3
 
(b) 2
 
(c) 6
 
(d) 4
 
This interesting question is from K-ary Tree in portion Trees of Data Structures & Algorithms I
 
The question was asked in quiz.

1 Answers
Editor">Editor Staff answered 1 month ago

Right option is (c) 6
 
For explanation: Size of the K-ary tree is defined as the total number of nodes present in the tree. Since there are total of 6 nodes in the K-ary tree. So the size of the K-ary tree is 6.