CS-301 Final Term Exams Preparation Virtual University With Answers

CS-301 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 A kind of expression where the operator is present between two operands called ________ expressions . Postfix Infix Prefix None of the above
2 "+” is a _________operator. Unary Binary Ternary None of the above
3 it will be efficient to place stack elements at the start of the list because insertion and removal take _______time. Variable Constant Inconsistent None of the above <br>
4 A binary tree with 24 internal node has ____ external node. 22 23 48 25
5 Suppose A is an array containing numbers in increasing order, but some numbers occur more than once when using a binary search for a value, the binary search always finds ____________ the first occurrence of a value. the second occurrence of a value may find first or second occurrence of a value. None of the given options
6 Which of the given option is NOT a factor in Union by Size: Maintain sizes (number of nodes) of all trees, and during union. Make smaller tree, the subtree of the larger one Make the larger tree, the subtree of the smaller one. Implementation: for each root node i, instead of setting parent[i] to -1, set it to -k if tree rooted at i has k nodes
7 A complete binary tree of height ____ has nodes between 16-31. 2 3 4 5
8 The maximum number of external nodes for a binary tree of height H is 2<sup>h</sup> 2<sup>h</sup>+1 2<sup>h</sup>+2 2<sup>h</sup>+3
9 _________ is a data structure that can grow easily dynamically at run time without having to copy existing elements. Array () List Both of these None of these
10 Consider a min heap, represented by the following array: 11,22,33,44,55 After inserting a node with value 66.Which of the following is the updated min heap? 11,22,33,44,55,66 11,22,33,44,66,55 11,22,33,66,44,55 11,22,66,33,44,55
Download This Set

Is this page helpful?