Data Structures Algorithms Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to Data Structures Algorithms. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : A

Explanation

In a min heap, parents always have lesser or equal values than that of their childs.

Q 2 - What data structure is used for depth first traversal of a graph?

A - queue

B - stack

C - list

D - none of the above

Answer : B

Explanation

Stack is used for depth first traversal whereas queue is used for breadth first traversal

Q 3 - Minimum number of queues required for priority queue implementation?

A - 5

B - 4

C - 3

D - 2

Answer : D

Explanation

Minimum number of queues required for priority queue implementation is two. One for storing actual data and one for storing priorities.

Q 5 - Which of the below given series is Non-Increasing Order −

A - 1, 3, 4, 6, 8, 9

B - 9, 8, 6, 4, 3, 1

C - 9, 8, 6, 3, 3, 1

D - 1, 3, 3, 6, 8, 9

Answer : C

Explanation

A sequence of values is said to be in non-increasing order, if the successive element is less than or equal to its previous element in the sequence.

Answer : D

Explanation

Binary heap heapify operation has time-complexity of Ο(n), while other operations have time-complexity of Ο(1) only.

Q 7 - The Θ notation in asymptotic evaluation represents −

A - Base case

B - Average case

C - Worst case

D - NULL case

Answer : A

Explanation

Θ represents average case. Ο represents worst case and Ω represents base case.

Answer : A

Explanation

Heap maintains itself to meet all the requirements of complete binary tree.

Answer : A

Explanation

BST does not care about complete binary tree properties.

Answer : B

Explanation

Efficiency of algorithm is measured by assuming that all other factors e.g. processor speed, are constant and have no effect on implementation.


data_structures_algorithms_questions_answers.htm

Advertisements
E-Books Store