BITS WILP MSSS 2013-15 (S2-13_SSZG519) EC1 Quiz Question 1. A characteristic of the data, that binary search uses but the linear search ignores is the___________. o a. Order of the elements of the list. o b. Type of elements of the list o c. Maximum value in list. o d. Length of the list. Question 2. A linear collection of data elements where the linear node is given by means of pointer is called o a. linked list o b. node list o c. primitive list o d. None of the above o Option 5 Question 3. A _________ data type is a keyword of a programming language that specifies the amount of memory needed to store data and the kind of data that will be stored in that memory location o a. None of the above o b. vector o c. abstract o d. int Question 4. An algorithm is made up of two independent time complexities f (n) and g (n). Then the complexities of the algorithm is in the order of o a. Min (f(n),g(n)) o b. f(n)g(n) o c. Max ( f(n),g(n)) o d. f(n) + g(n) Question 5. An algorithm that requires __________ operations to complete its task on n data elements is said to have a linear runtime. o a. 3n2 + 2 o b. 8 o c. 3n+2 o d. 3n 2 + 3n + 2 Question 6. Assume that we are running MergeSort on an array containing the following values: 7,5,9,4,4,8,2,6. What does the array contain just before the last call to a merge? o a. 4,5,7,9,4,8,2,6 o b. 4,5,7,9,2,4,8,6 o c. 2,4,4,5,6,9,7,8 o d. 2,4,4,5,6,7,8,9 Question 7. If A = 6,12,3,9,4,12 and to search element 6 in this array using binary search method, what will be the values of a[mid] generated after each iteration ? o a. 4,9,6 o b. 4,6 o c. 3,4,6 o d. 6 Question 8. If f(n) = 2n; g(n) = 3n which of the following is true? o a. f(n) = O(g(n)) o b. f(n) = (g(n)) o c. None of these o d. f(n) = (g(n)) Question 9. If sequence of operations – push(1), push(2), pop, pop, push(1), push(2), pop, push(2), pop, pop are performed on the stack, sequence of popped out values are o a. 2,2,1,1,1 o b. 2,2,1,2,1 o c. 2,1,2,1,1 o d. 2,1,2,2,1 Question 10. If the array A contains the items 10 ,4, 7, 23, 67, 12, 5, what will be resultant array A after 3rd pass of Insertion sort? o a. 67,12,10,5,4,7,23 o b. 4,7,10,23,67,12,5 o c. 4,5,7,67,10,12,23 o d. 10,7,4,67,23,12,5 Question 11. If the array A contains the items 100,23,90,45,2,34,8 what will be resultant array A after 3rd pass of selection sort? o a. 2,8,23,34,45,100,98 o b. 2,8,23,34,100,45,98 o c. 2,23,45,90,100,34,8 o d. 2,8,23,45,100,34,98 Question 12. In an array queue, data is stored in an _____ element. o a. linked list o b. array o c. Node o d. Constructor Question 13. Stack A has entries a, b, c(with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed on to stack B. An entry popped out of Stack B can be printed. In this arrangement, which of the following permutations of a, b, c is not possible. o a. c,a,b o b. b,a,c o c. b,c,a o d. a,b,c Question 14. The smallest element of an array index is called its o a. upper bound o b. range o c. lower bound o d. all of these Question 15. What term is used to describe an O(1) algorithm? o a. Linear o b. Constant o c. Logarithmic o d. Quadratic Question 16. Which is the solution for the recurrence T (n) = 8T (n/2) + n o a. θ ( lg n) o b. None of the above o c. θ (n lg n) o d. θ ( n 3) Question 17. Which of the following abstract data types are NOT used by Integer Abstract Data type group ? o a. Short o b. Int o c. Float o d. Long Question 18. Which of the following is not a dynamic data structure? o a. Array o b. Binary Tree o c. Linked list o d. Stack Question 19. Which of the following represents the efficiency of the selection sort? o a. O(n2) o b. O(1) o c. O(log n) o d. O(n) Question 20. ______________ form of access is used to add and remove nodes from a stack. o a. Both LIFO & FIFO o b. LIFO o c. None of the above o d. FIFO
© Copyright 2024