# 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 - A procedure that calls itself is called

### Answer : C

### Explanation

In recursion, a procedure calls itself, either directly or by calling a procedure which in turn calls it.

Q 2 - Which one of the below mentioned is linear data structure −

### Answer : D

### Explanation

All mentioned data structures are linear in nature.

Q 3 - Which of the following asymptotic notation is the worst among all?

### Answer : B

### Explanation

Ο(n+9378) is n dependent

Ο(n^{3}) is cubic

n^{Ο(1)} is polynomial

2^{Ο(n)} is exponential

Q 4 - Binary search tree has best case run-time complexity of Ο(log n). What could the worst case?

### Answer : A

### Explanation

In case where binary search tree is left or right intended, the worst case can be Ο(n)

Q 5 - Which of the following has search effeciency of Ο(1) −

### Answer : C

### Explanation

A simple hash table has the Ω(1) efficiency.

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 - `node.next -> node.next.next;`

will make

### Answer : A

### Explanation

After applying `node.next -> node.next.next;`

we will not have node.next stored anywhere if not explicitly mentioned.

Q 8 - Program with highest run-time complexity is

### Answer : A

### Explanation

Tower of hanoi has the highest run time complexity

Q 9 - A pivot element to partition unsorted list is used in

### Answer : B

### Explanation

The quick sort partitions an array using pivot element and then calls itself recursively twice to sort the resulting two subarray.

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.