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 - In a min-heap:
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?
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 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
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 −
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?
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 −
Array in C are static and cannot be shrinked or expanded in run-time.
Q 8 - Program with highest run-time complexity is
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
Regardless of which algorithm is used, in a graph with unique weight, resulting spanning tree will be same.
Q 10 - Interpolation search is an improved variant of binary search. It is necessary for this search algorithm to work that −
For this algorithm to work properly the data collection should be in sorted form and equally distributed.