Sr. # | Questions | Answers Choice |
---|---|---|
1 | In a min heap , preculateDown procedure will move smaller value______ and bigger value______. | left,right right,left up,down down,up |
2 | Consider the following postfix expression S and the initial values of the variable, S = A B - C + D E F - + ^
Assume that A=3, B=2, C=1, D=1, E=2, F=3
What would be the final output of the stack? |
1 2 0 -1 |
3 | In a selection sort of n element ,how many times the swap function is called the execution of the algorithm? | n-1 0 n log n 1 |
4 | 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 |
5 | Which of the following is a property of binary tree? | A binary tree of N external nodes has N internal node. A binary tree of N internal nodes has N+ 1 external node A binary tree of N external nodes has N+ 1 internal node A binary tree of N internal nodes has N- 1 external node. |
6 | Which of the following statements is correct property of binary trees? | A binary tree with N internal nodes has N+1 internal links A binary tree with N external nodes has 2N internal nodes A binary tree with N internal nodes has N+1 external nodes. None of above statement is a property of the binary tree |
7 | Consider te following array 23 15 5 12 40 10 7 After the first pass of a particular algorithm, the array looks like 15 5 12 23 10 7 40 Name the algorithm used | Heap sort Selection sort Insertion sort Bubble sort |
8 | Which of the following heap method increase the value of key at position „p‟ by the amount „delta‟? | increaseKey(p,delta) decreaseKey(p,delta) preculateDown(p,delta) remove(p,delta) |
9 | Which one of the following is TRUE about iteration? | Iteration extensively uses stack memory Threaded Binary Trees use the concept of iteration. Iterative function calls consumes a lot of memory. Recursion is more efficient than iteration. |
10 | Which one of the following is TRUE about recursion ? | Recursion extensively use stack memory Threaded Binary Trees use the concept of recursion. Recursive function calls consume a lot of memory. Iteration is more efficient than iteration. |
11 | I have implemented the queue with a circular array. If data is a circular array of CAPACITY elements, and last is an index into that array, what is the formula for the index after last? | (last % 1) + CAPACITY last % (1 + CAPACITY) (last + 1) % CAPACITY last + (1 % CAPACITY) |
12 | In sequential access data structure ,accessing any element in the data structure takes different amount of time.Tell which one of the following is sequential access data structure. | Arrays Lists Both of these None of these |
13 | Which one of the following is valid postfix expression? | ab+c*d- abc*+d- abc+*d- abc*)+d- |
14 | In an array list the current element is | the first element the middle element the last element The element where the current pointer points to |
15 | The data of the problem is of 2 GB and the hard disk is of 1 GB capacity,to solve this problem we should | use better data structure Increase the hard disk space Use the better algorithm Use as much data as we can store on the hard disk |
16 | Which of the following is a non linear data structure? | Linked List Stack Tree Queue |
17 | Which traversal gives a decreasing order of elements in a heap where the max element is stored at the top? | post-order level -order in order none of the above |
18 | Consider the following paragraph with blanks. A …….…….. is a linear list where …………… and ………… take place at the same end . This end is called the …….………. What would be the correct filling the above blank positions? | (i) queue (ii) insertion (iii) removals (iv) top (i) stack (ii) insertion (iii) removals (iv) bottom (i) stack (ii) insertion (iii) removals (iv) top (i) tree (ii) insertion (iii) removals (iv) top |
19 | While joining nodes in the building of Huffman encoding tree if there are more nodes with same frequency, we choose the nodes _______. | Randomly That occur first in the text message That are lexically smaller among others That are lexically greater among others |
20 | Which formula is the best approximation for the depth of a heap with n nodes? | log (base 2) of n The number of digits in n (base 10), e.g., 145 has three digits The square root of n n |