 Sample Questions, Previous Year Solved Papers, Study Materials For Competitive Examinations Like UGC NET, SET And GATE Computer Science.

Friday, 8 September 2017

171.       Project scheduling is an example of ................
(A) Greedy programming
(B) Dynamic programming
(C) Divide and conquer
(D) None of the above.
172.       Minimum number of queues required for priority queue implementation?
(A) 5
(B) 4
(C) 3
(D) 2
173.       From a complete graph, by removing maximum ................ edges, we can construct a spanning tree.
(A) e-n+1
(B) n-e+1
(C) n+e-1
(D) e-n-1
174.       Which of these algorithmic approaches tries to achieve localized optimum solution?
(A) Greedy approach
(B) Divide and conquer approach
(C) Dynamic approach
(D) All of the above
175.       In worst case Quick Sort has order ..............
(A) O(n log n)
(B) O(n2/2)
(C) O(log n)
(D) O(n2/4)

176.       To partition unsorted list a pivot element is used in ...............
(A) Merge Sort
(B) Quick Sort
(C) Insertion Sort
(D) Selection Sort
177.       What is the worst case time complexity of linear search algorithm?
(A) Ο(1)
(B) Ο(n)
(C) Ο(log n)
(D) Ο(n2)
Explanation
Linear search scans sequentially to find the target value. The best case is Ο(1) and average and worst case is Ο(n). Worst case is when data is not in the list, and it has to scan all n elements.
178.       A full binary tree with 2n+1 nodes contain ................
(A) n leaf nodes
(B) n non-leaf nodes
(C) n-1 leaf nodes
(D) n-1 non-leaf nodes
179.       Which of the following statements about stacks is incorrect?
(A) Stacks can be implemented using linked lists.
(B) Stacks are first-in, first-out (FIFO) data structures.
(C) New nodes can only be added to the top of the stack.
(D) The last node (at the bottom) of a stack has a null (0) link.