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
Expression notations are not reverse (or so) of each other, rather operators used in the expression have different arrangements.
Q 3 - The following formula will produce
Fn = Fn-1 + Fn-2
Fibonacci Series generates subsequent number by adding two previous numbers.
Q 4 - If the array is already sorted, which of these algorithms will exhibit the best performance
Insertion sort, as it should then work in linear way.
Q 5 - What about recursion is true in comparison with iteration?
Recursion is just an other way to write the same program code. But calling a function again and again makes it expensive in terms of memory, CPU cycles and delivers less performance.
Q 6 - Match the following −
|(1) Bubble Sort||(A) Ο(n)|
|(2) Shell Sort||(B) Ο(n2)|
|(3) Selection Sort||(C) Ο(n log n)|
Q 7 - Index of arrays in C programming langauge starts from
Arrays, in C, starts from 0 which is mapped to its base address.
Q 8 - Tower of hanoi is a classic example of
The recursive approach of tower of hanoi uses divide and conquer method.
Q 9 - If locality is a concern, you can use _______ to traverse the graph.
DFS is a better choice when locality-wise items are concerned.
Q 10 - Apriori analysis of an algorithm assumes that −
Efficiency of algorithm is measured by assuming that all other factors e.g. processor speed, are constant and have no effect on implementation.