1  A solution is said to be efficient if it solves the problem within its resource constraints i.e. hardware and time  True  False    A 
2  Which one of the following is known as "LastIn, FirstOut" or LIFO Data Structure?  Linked List  Stack  Queue  Tree  B 
3  What will be postfix expression of the following infix expression? Infix Expression : a+b*cd  ab+c*d  abc*+d  abc+*d  abcd+*  B 
4  For compiler a postfix expression is easier to evaluate than infix expression?  True  False    A 
5  declare a stack of characters, while ( there are more characters in the word to read ){read a character; push the character on the stack;} while ( the stack is not empty ){pop a character off the stack; write the character to the screen;} input "apples"?  selpa  selppa  apples  aaappppplleess  B 
6  Consider the following function: void test_a(int n) {cout << n << " "; if (n>0) test_a(n2); } What is printed by the call test_a(4)?  4 2  0 2 4  0 2  2 4  A 
7  If there are N external nodes in a binary tree then what will be the no. of internal nodes in this binary tree?  N 1  N +1  N+2  N  A 
8  If there are N internal nodes in a binary tree then what will be the no. of external nodes in this binary tree?  N 1  N +1  N+2  N  B 
9  If we have 1000 sets each containing a single different person. Which of the following relation will be true on each set:  Reflexive  Symmetric  Transitive  Associative  A 
10  Which one of the following is NOT the property of equivalence relation  Reflexive  Symmetric  Transitive  Associative  D 
11  A binary tree of N nodes has _______  Log10 N levels  Log2 N levels  N / 2 levels  N x 2 levels  B 
12  The easiest case of deleting a node from BST is the case in which the node to be deleted ___________  Is a leaf node  Has left subtree only  Has right subtree only  Has both left and right subtree  A 
13  If there are N elements in an array then the number of maximum steps needed to find an element using Binary Search is _______  N  N^2  Nlog2N  log2N  D 
14  Merge sort and quick sort both fall into the same category of sorting algorithms. What is this category?  O(nlogn) sorts  Interchange sort  Average time is quadratic  None of the given options  D 
15  If one pointer of the node in a binary tree is NULL then it will be a/an _______  External node  Root node  Inner node  Leaf node  A 
16  We convert the ________ pointers of binary to threads in threaded binary tree  Left  Right  NULL  None of the given options  C 
17  If the bottom level of a binary tree is NOT completely filled, depicts that the tree is NOT a  Expression tree  Threaded binary tree  complete Binary tree  Perfectly complete Binary tree  C 
18  What is the best definition of a collision in a hash table?  Two entries are identical except for their keys  Two entries with different data have the exact same key  Two entries with different keys have the same exact hash value  Two entries with the exact same key have different hash values  C 
19  Suppose that a selection sort of 100 items has completed 42 iterations of the main loop. How many items
are now guaranteed to be in their final spot (never to be moved again )  21  41  42  43  C 
20  Suppose you implement a Min heap (with the smallest element on top) in an array. Consider the different arrays
below; determine the one that cannot possibly be a heap:  16, 18, 20, 22, 24, 28, 30  16, 20, 18, 24, 22, 30, 28  16, 24, 18, 28, 30, 20, 22  16, 24, 20, 30, 28, 18, 22  D 
21  Which of the following statement is correct about find(x) operation  A find(x) on element x is performed by returning exactly the same node that is found  A find(x) on element x is performed by returning the root of the tree containing x  A find(x) on element x is performed by returning the whole tree itself containing x  A find(x) on element x is performed by returning TRUE  B 
22  Which of the following statement is NOT correct about find operation  It is not a requirement that a find operation returns any specific name, just that finds on two elements
return the same answer if and only if they are in the same set  One idea might be to use a tree to represent each set, since each element in a tree has the same root,
thus the root can be used to name the set  Initially each set contains one element  Initially each set contains one element and it does not make sense to make a tree of one node only  B 
23  In complete binary tree the bottom level is filled from ________  Left to right  Right to left  Not filled at all  None of the given options  A 
24  Here is an array of ten integers: 5 3 8 9 1 7 0 2 6 4 The array after the FIRST iteration of the large loop in a selection sort (sorting from smallest to largest)  0 3 8 9 1 7 5 2 6 4  2 6 4 0 3 8 9 1 7 5  2 6 4 9 1 7 0 3 8 5  0 3 8 2 6 4 9 1 7 5  A 
25  What requirement is placed on an array, so that binary search may be used to locate an entry?  The array elements must form a heap  The array must have at least 2 entries  The array must be sorted  The array‟s size must be a power of two  C 
