Sunday, 7 February 2016

KPSC Lecturer in Computer Science Solved Paper (002/2012) 23-11-2015 - Part 5

41.       Which of the following represents the average-case performance of a quicksort algorithm?
(A) O(n)             (B) O(log n)
(C) O(n/2)          (D) O(nlog n)
Answer: D
42.       Which of the following is not the required condition for binary search algorithm?
(A) The list must be sorted
(B) There should be direct access to the middle element in any sublist
(C) There must be mechanism to delete and/or insert element in list
(D) None of these
Answer: C
43.       A 3-ary tree is a tree in which every internal node has exactly 3 children. The number of leaf nodes in such a tree with 6 internal nodes will be
(A) 10     (B) 23
(C) 17     (D) 13
Answer: D
44.       Of the following sorting algorithms, the one which has a running time that is least dependent on the initial ordering of the input is
(A) Insertion sort          (B) Quick sort
(C) Merge sort              (D) Selection sort
Answer: C
45.       The number of edges in a regular graph of degree d and n vertices is
(A) maximum(n,d)        (B) n+d
(C) nd                            (D) nd/2
Answer: D

46.       The depth of a complete binary tree is given by
(A) n log n                     (B) log n + 1
(C) log n                                    (D) n log n + 1
Answer: B
47.       Convert the expression ((A+B)*C-(D-E)^(F+G)) to equivalent Postfix notation
(A) AB+C*DE--FG+^
(B) AB-C*DE--FG+^
(C) AB+CDE*--FG+^
(D) AB+*CDE--FG+^
Answer: A
48.       Merge sort uses
(A) Divide and Conquer strategy      (B) Backtracking approach
(C) Heuristic search                            (D) Greedy approach
Answer: A
49.       Linked lists are best suited
(A) for relatively permanent collections of data
(B) for the size of the structure and the data in the structure are constantly changing
(C) for both of above situations
(D) for none of above situations
Answer: B
50.    The complexity of the average case of an algorithm is
(A) much more complicated to analyze than that of worst case
(B) much more simpler to analyze than that of worst case
(C) some times more complicated and some other times simpler than that of worst case
(D) none of the above
Answer: A



0 comments:

Post a Comment