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

## Tuesday, 5 September 2017

141.       A sorting technique which uses the binary tree concept such that label of any node is larger than all the labels in the subtrees, is called ................
(A) Selection sort
(B) Insertion sort
(C) Heap sort
(D) Quick sort
Explanation:
A Sorting technique which uses the binary tree concept such that label of any node is larger than all the, labels in the sub trees, is called Heap sort because heap sort works on a complete binary tree with the property that the value at any node 'N' of the tree should be greater than or equal to the value at all its children nodes.
142.       A balance factor in AVL tree is used to check ..................
(A) what rotation to make.
(B) if all child nodes are at same level.
(C) when the last rotation occurred.
(D) if the tree is unbalanced.
143.       A full binary tree with 'n' non-leaf nodes contains ..............
(A) log2 n nodes
(B) n+1 nodes
(C) 2n nodes
(D) 2n+l nodes
144.       A graph 'G' with 'n' nodes is bipartite if it contains .............
(A) n edges
(B) a cycle of odd length
(C) no cycle of odd length
(D) n2 edges
145.       Recursive procedures are implemented by using .................... data structure.
(A) queues
(B) stacks
(D) strings
Explanation:
Recursive procedures are implemented by using stacks because stacks are LIFO data structure and we need this feature to store return addresses of various recursive calls in recursive procedures.

146.       Which one of the below is not divide and conquer approach?
(A) Insertion Sort
(B) Merge Sort
(C) Shell Sort
(D) Heap Sort
147.       Which of the following is not a sequence container provided by the STL?
(A) vector
(B) array
(C) list
(D) deque
148.       Quick sort algorithm is an example of .............
(A) Greedy approach
(B) Improved binary search
(C) Dynamic Programming
(D) Divide and conquer
149.       In ............., the difference between the height of the left sub tree and height of the right tree, for each node, is almost one.
(A) Binary search tree
(B) AVL - tree
(C) Complete tree