n-ary Tree


Q1.

Of the following, which best approximates the ratio of the number of nonterminal nodes in the total number of nodes in a complete K-ary tree of depth N ?
GateOverflow

Q2.

A complete n-ary tree is a tree in which each node has n children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n-ary tree. If L = 41, and I = 10, what is the value of n?
GateOverflow

Q3.

A complete n-ary tree is one in which every node has 0 or n sons. If x is the number of internal nodes of a complete n-ary tree, the number of leaves in it is given by
GateOverflow

Q4.

Consider the following rooted tree with the vertex labelled P as the root The order in which the nodes are visited during an in-order traversal of the tree is
GateOverflow

Q5.

The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is
GateOverflow

Q6.

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:
GateOverflow