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

### Explanation

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

Q 3 - The following formular is of

`left_subtree (keys)  ≤  node (key)  ≤  right_subtree (keys)`

A - Bianry Tree

B - Complete Binary Tree

C - Binary Search Tree

D - All of the above

### Explanation

A binary search tree (BST) is a tree in which all nodes follows the below mentioned properties −

• The left sub-tree of a node has key less than or equal to its parent node's key.

• The right sub-tree of a node has key greater than or equal to its parent node's key.

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

A - Binary Search

B - Interpolation Search

C - Linear Search

D - All of the above

### 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 - Apriory algorithm analysis does not include −

A - Time Complexity

B - Space Complexity

C - Program Complexity

D - None of the above!

### Explanation

Algorithms are independent of programming languages, hence, program complexity is not a part of algorithm analysis.

Q 6 - Which of the below mentioned sorting algorithms are not stable?

A - Selection Sort

B - Bubble Sort

C - Merge Sort

D - Insertion Sort

### Explanation

Except selection sort, all other soring algorithms are stable.

Q 7 - Which of the following is not possible with an array in C programming langauge −

A - Declaration

B - Definition

C - Dynamic Allocation

D - Array of strings

### Explanation

Array in C are static and cannot be shrinked or expanded in run-time.

Q 8 - Program with highest run-time complexity is

A - Tower of Hanoi

B - Fibonacci Series

C - Prime Number Series

D - None of the above

### Explanation

Tower of hanoi has the highest run time complexity

Q 9 - If we choose Prim's Algorithm for uniquely weighted spanning tree instead of Kruskal's Algorithm, then

A - we'll get a different spanning tree.

B - we'll get the same spanning tree.

C - spanning will have less edges.

D - spanning will not cover all vertices.