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

## Friday, 18 August 2017

11.       In order to get the information stored in a BST in the descending order, one should traverse it in which of the following order?
(A) left, root, right
(B) root, left, right
(C) right, root, left
(D) right, left, root
12.       The following sorting algorithms maintain two sub-lists, one sorted and one to be sorted:
(A) Selection Sort
(B) Insertion Sort
(C) Merge Sort
(D) both (A) and (B)
13.       What does the following function do for a given Linked List with first node as head?
{
return;

}
(A) Prints all nodes of linked lists
(B) Prints all nodes of linked list in reverse order
(C) Prints alternate nodes of Linked List
(D) Prints alternate nodes in reverse order
14.       Is it possible to create a doubly linked list using only one pointer with every node?
(A) Not Possible
(B) Yes, possible by storing XOR of current node and next node
(C) Yes, possible by storing XOR of addresses of previous and next nodes.
(D) Yes, possible by storing XOR of current node and previous node
15.       Every internal node in a B-tree of minimum degree 2 can have
(A) 2, 3 or 4 children
(B) 1, 2 or 3 children
(C) 2, 4 or 6 children
(D) 0, 2 or 4 children
16.       Which sorting algorithm is the best if the list is already in order?
(A) Quick sort
(B) Merge sort
(C) Insertion sort
(D) None of these
17.       In .............. the difference between the height of the left sub tree and height of right sub tree, for each node, is not more than one
(A) BST
(B) Complete Binary Tree
(C) AVL-tree
(D) Balanced Search tree
18.       If the array is already sorted, which of these algorithms will exhibit the best performance?
(A) Merge Sort
(B) Insertion Sort
(C) Quick Sort
(D) All of these
19.       Queue data structure works on ..............
(A) LIFO
(B) FIFO
(C) FILO
(D) None of these