Algorithms Design And Analysis MCQS with Answers Set 8

Algorithms Design And Analysis MCQS with Answers

Algorithms Design And Analysis MCQS with Answers is mainly intended fro GATE aspirants.These questions can also came in Btech Computer science university exams and various interview for computer science students

(111) If each node in a tree has value greater than every value in its left sub tree and value less than every value in its right sub tree, the tree is known as
(A) complete tree                   (B) full binary tree     
(C) binary search tree                         (D) threaded tree
(112) Which of the following sorting procedure is the slowest?
(A) Quick sort              (B) Heap sort               (C) Shell sort               (D) Bubble sort
(113) which of the following shows the correct relationship among some of the more common computing times on algorithms
(A) O(log n) < O(n) < O( n* log n) < O(2n) < O(n2)
(B) O(n) < O(log n) < O( n* log n) < O(2n) < O(n2)
(C) O(n) < O(log n) < O( n* log n) < O(n2) < O(2n)
(D) O(log n) < O(n) < O( n* log n) < O(n2) < O(2n)
(114) The average time required to perform a successful sequential search for an element in an array A(1..n) is given by
(A) (n+1)/2                  (B) n(n+1)/2                (C) log n                      (D) n2
(115) the time complexity of linear search algorithm over an array of n elements is
(A) O(log n)                 (B) O(n)                       (C)  O( n log n)            (D) O(n2)
(116) the time taken by binary search algorithm to search a key in a sorted array of n elements is
(A) O(log n)                 (B) O(n)                       (C)  O( n log n)            (D) O(n2)
(117) the time required to search an element in a linked list of length n is
(A) O(log n)                 (B) O(n)                       (C)  O( 1)                     (D) O(n2)
(118) the worst case time required to search a given element in sorted linked list of length n is
(A) O(1)                       (B) O( log n)                (C)  O(n)          (D) O(n log n)
(119)  consider a linked list of n elements which is pointed by an external pointer. What is the time taken to delete the element which is successor of the element pointed to by a given pointer?
(A) O(1)                       (B) O( log n)                (C)  O(n)          (D) O(n log n)
(120) consider a linked list of n elements. What is the time taken to insert an element an after element pointed by some pointer?
(A) O(1)                       (B) O( log n)                (C)  O(n)          (D) O(n log n)
 (121) which of the following operations is performed more efficiently by doubly linked list than by linear linked list?
(A) Deleting a node whose location is given
(B) searching an unsorted list for a given item
(C) inserting a node after the node with a given location
(D) Traversing the list to process each node
(122) the five items: A,B,C,D and E are pushed in a stack, one after the other starting from A. The stack is popped four items and each element is inserted in a queue. Then two elements are deleted from the queue and pushed back on the stack. Now on item is popped from the stack. The popped item is
(A) A                (B) B                (C) C                (D) D
(123) the time required to search an element in a binary search tree having n elements is
(A) O(1)                       (B) O( log n)                (C)  O(n)          (D) O(n log n)
(124) for a linear search in an array of n elements the time complexity for best, worst and average case are …., and …respectively.
(A) O(n) , O(1) and O(n/2)                              (B)  O(1) , O(n) and O(n/2)
(C) ) O(1) , O(n) and O(n)                               (D) ) O(1) , O(n) and O((n-1)/2)
(125) the number of comparisons required by binary search of 100000 elements is
(A) 15              (B) 20              (C) 25              (D) 30
(126) Find an optimal parenthesization of a  matrix chain product whose sequence of dimension s is <5,4,6,2,7>
(A) 156            (B) 154            (C) 158            (D) 157
(127) Find an optimal parenthesization  of a  matrix chain product whose sequence of dimension s is <5,10,3,12, 5, 50, 6>
(A) 2010          (B) 2020          (C) 2015          (D) 2030
(128) Find an optimal parenthesization  of a  matrix chain product whose sequence of dimension s is <4,10,3,12,20,7>
(A) 1334          (B) 1324          (C)1344           (D)1354
(129) Find an optimal parenthesization  of a  matrix chain product whose sequence of dimension s is <5,4,3>  (for three matrices)
(A) 125            (B) 130            (C) 135            (D) 140
(130) Find an optimal parenthesization  of a  matrix chain product whose sequence of dimension s is <30,35,15,5,10,20,25> (for six matrices)
(A)7130           (B) 7125          (C) 7145          (D) 7135

Algorithms Design And Analysis MCQS with Answers


111 C
112 D
113 D
114 A
115 B
116 A
117 B
118 C
119 A
120 A
121 A
122 D
123 B
124 C
125 B
126 C
127 A
128 C
129 C
130 B

This entry was posted on Friday, 5 September 2014 and is filed under ,. You can follow any responses to this entry through the RSS 2.0. You can leave a response.

Leave a Reply