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.

Wednesday, 20 September 2017

Data Structures and Algorithms Multiple Choice Questions - Set 23

221.       The process of accessing data stored in a serial access memory is similar to manipulating data on a ...............
(A) heap
(B) queue
(C) stack
(D) binary tree
Answer: C
222.       Recursion uses more memory space than iteration because ...............
(A) it uses stack instead of queue.
(B) every recursive call has to be stored.
(C) both A & B are true.
(D) None of the above.
Answer: B
223.       Stack is used for .................
(A) CPU Resource Allocation
(B) Breadth First Traversal
(C) Recursion
(D) None of the above
Answer: C
224.       A graph with n vertices will definitely have a parallel edge or self loop if the total number of edges are ...................
(A) greater than n–1
(B) less than n(n–1)
(C) greater than n(n–1)/2
(D) less than n2/2
Answer: A
225.       Re-balancing of AVL tree costs ..............
(A) Ο(1)
(B) Ο(log n)
(C) Ο(n)
(D) Ο(n2)
Answer: B
226.       Given that the line
delete newPtr;
just executed, what can you conclude?
(A) The memory referenced by newPtr is released only if it is needed by the system.
(B) The pointer newPtr is of type void *.
(C) The pointer newPtr only exists if there was an error freeing the memory.
(D) The pointer newPtr still exists.
Answer: D
227.       A BST is traversed in the following order recursively: Right, root, left
The output sequence will be in
(A) Ascending order
(B) Descending order
(C) Bitomic sequence
(D) No specific order
Answer: B
228.       Quick sort running time depends on the selection of ..................
(A) size of array
(B) pivot element
(C) sequence of values
(D) none of the above
Answer: B
229.       The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum ..............
(A) Three nodes
(B) Two nodes
(C) One node
(D) Any number of nodes
Answer: C
230.    The postfix form of A*B+C/D is”
(A) *AB/CD+
(B) AB*CD/+
(C) A*BC+/D
(D) ABCD+/*
Answer: B


No comments:

Post a Comment