Computer Science Study Materials for Competitive Exams

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

Sunday, 3 September 2017

Data Structures and Algorithms Multiple Choice Questions - Set 13

121.       n elements of a Queue are to be reversed using another queue. The number of “ADD” and “REMOVE” operations required to do so is:
(A) 2*n
(B) 4*n
(C) n
(D) The task cannot be accomplished
Answer: D
122.       A complete binary tree with n leaf nodes has ..............
(A) n+1 nodes
(B) 2n-1 nodes
(C) 2n+1 nodes
(D) n(n-1)/2 nodes
Answer: B
123.       A binary tree can be converted in to its mirror image by traversing it in ..............
(A) In-order
(B) Pre-order
(C) Post-order
(D) Any order
Answer: B
124.       The time required to delete a node x from a doubly linked list having n nodes is .............
(A) O(n)
(B) O(log n)
(C) O(1)
(D) O(n log n)
Answer: C
125.       In doubly linked lists:
(A) a pointer is maintained to store both next and previous nodes.
(B) two pointers are maintained to store next and previous nodes.
(C) a pointer to self is maintained for each node.
(D) none of these
Answer: B
126.       One can convert an infix expression to a postfix expression using a ..............
(A) Stack
(B) Queue
(C) Deque
(D) None of these
Answer: A
127.       Which one of the below mentioned is linear data structure?
(A) Queue
(B) Stack
(C) Arrays
(D) All of these
Answer: D
Explanation
All mentioned data structures are linear in nature.
128.       Which of the following types of expressions do not require precedence rules for evaluation?
(A) fully parenthesised infix expression
(B) postfix expression
(C) partially parenthesised infix expression
(D) more than one of the above
Answer: A
129.       Overflow condition in linked list may occur when attempting to .............
(A) Create a node when free space pool is empty.
(B) Traverse the nodes when free space pool is empty.
(C) Create a node when linked list is empty.
(D) None of these.
Answer: A
130.    Linked lists are not suitable data structures for which one of the following problems?
(A) Insertion sort
(B) Binary search
(C) Radix sort
(D) Polynomial manipulation
Answer: B


No comments:

Post a Comment