# Data Structures Algorithms Online Quiz

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.

Q 1 - In a min-heap:

A - parent nodes have values greater than or equal to their childs

B - parent nodes have values less than or equal to their childs

### 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?

### Answer : B

### Explanation

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

### 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 4 - What is not true about insertion sort?

A - Exhibits the worst case performance when the initial array is sorted in reverse order.

B - Worst case and average case performance is Ο(n^{2})

C - Can be compared to the way a card player arranges his card from a card deck.

### Answer : D

### Explanation

All given options are true about insertion sort.

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

### 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.

Q 6 - In context with time-complexity, find the odd out −

A - Deletion from Linked List.

### 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 −

### Answer : A

### Explanation

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

Q 8 - Heap is an example of

### Answer : A

### Explanation

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

Q 9 - Binary search tree is an example of complete binary tree with special attributes.

A - BST does not care about complete binary tree properties.

B - BST takes care of complete binary tree properties.

### Answer : A

### Explanation

BST does not care about complete binary tree properties.

Q 10 - Apriori analysis of an algorithm assumes that −

A - the algorithm has been tested before in real environment.

B - all other factors like CPU speed are constant and have no effect on implementation.

### 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.