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.

Questions and Answers

Q 1 - A procedure that calls itself is called

A - illegal call

B - reverse polish

C - recursive

D - none of the above

Answer : C

Explanation

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

Q 2 - A circular linked list can be used for

A - Stack

B - Queue

C - Both Stack & Queue

D - Neither Stack or Queue

Answer : C

Explanation

Both stack and queue data structure can be represented by circular linked-list.

Q 3 - A linked-list is a dynamic structure

A - true

B - false

Answer : A

Explanation

A linked-list is dynamic structure, it can shrink and expand as required by the program.

Q 4 - Which of the following algorithm is not stable?

A - Bubble Sort

B - Quick Sort

C - Merge Sort

D - Insertion Sort

Answer : B

Explanation

Among the given, only quick sort is not stable that is it may re-arrange the already sorted items.

Answer : C

Explanation

An algorithm is a step by step procedure to solve a computer problem.

Q 6 - The number of binary trees with 3 nodes which when traversed in post order gives the sequence A,B,C is ?

A - 3

B - 4

C - 5

D - 6

Answer : C

Explanation

Five binary trees (of 3 nodes) are possible.

Answer : B

Explanation

Recursion uses stack but the main reason is, every recursive call needs to be stored separately in the memory.

Answer : A

Explanation

Shell sort uses insertion sort when interval value is 1.

Answer : A

Explanation

For this algorithm to work properly the data collection should be in sorted form and equally distributed.

data_structures_algorithms_questions_answers.htm
Advertisements