GATE 2005 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2005

203 questions

MCQ 2031-mark 203

Questions 101–105 of 203

Q102Binary Tree1 markMCQ−0.33 if wrong
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most 2. If the height of the tree is h > 0, then the minimum number of nodes in the tree is

Q103n-ary Tree1 markMCQ−0.33 if wrong
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:

Q104Binary Search Tree1 markMCQ−0.33 if wrong
A binary search tree contains the numbers 1,2,3,4,5,6,7,8. When the tree is traversed in pre-order and the values in each node printed out, the sequence of values obtained is 5,3,1,2,4,6,8,7. If the tree is traversed in post-order, the sequence obtained would be

Q105Binary Search Tree1 markMCQ−0.33 if wrong
The numbers 1,2,.…n1, 2, .\dots n are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains p nodes. The first number to be inserted in the tree must be