# 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 - Prefix notation is alsow known as

### Answer : D

### Explanation

Polish Notation

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

### Answer : A

### Explanation

Queue is used for breadth first traversal whereas stack is used for depth first traversal.

Q 3 - Minimum number of moves required to solve a *Tower of Hanoi* puzzle is

### Answer : C

### Explanation

Minimum number of moves required to solve a Tower of Hanoi puzzle is 2^{n} - 1. Where n is the number of disks. If the number of disks is 3, then minimum number of moves required are 2^{3} - 1 = 7

Q 4 - Which of the following searching techniques do not require the data to be in sorted form

### Answer : A

### Explanation

Both binary and interpolation search requires data set to be in sorted form. Linear search can work even if the data is not sorted.

Q 5 - Which method can find if two vertices x & y have path between them?

### Answer : C

### Explanation

By using both BFS and DFS, a path between two vertices of a connected graph can be determined.

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.

### Answer : B

### Explanation

Linked lists has search complexity of Ο(n).

Q 8 - In the deletion operation of max heap, the root is replaced by

A - next available value in the left sub-tree.

B - next available value in the right sub-tree.

### Answer : D

### Explanation

Regardless of being min heap or max heap, root is always replaced by last element of the last level.

Q 9 - Access time of a binary search tree may go worse in terms of time complexity upto

### Answer : C

### Explanation

At maximum, BST may need to search all n values in the tree in order to access an element, hence, Ο(n).

Q 10 - Which of the following algorithm does not divide the list −

### Answer : A

### Explanation

Linear search, seaches the desired element in the target list in a sequential manner, without breaking it in any way.