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 - For a binary search algorithm to work, it is necessary that the array (list) must be
As binary search divides the list and selects a the sub-list to extend search based on comparison of values, it becomes necessary that the array (list) must be in sorted form.
Q 2 - What data structure is used for breadth first traversal of a graph?
Queue is used for breadth first traversal whereas stack is used for depth first traversal.
Q 3 - Which of the following is an example of dynamic programming approach?
All mentioned use dynamic programming approach. Before solving the in-hand sub-problem, dynamic algorithm will try to examine the results of previously solved sub-problems. The solutions of sub-problems are combined in order to achieve the best solution.
Q 4 - Maximum degree of any vertex in a simple graph of vertices n is
In a simple graph, a vertex can have edge to maximum n - 1 vertices.
Q 5 - Which of the below given series is Non-Increasing Order −
A sequence of values is said to be in non-increasing order, if the successive element is less than or equal to its previous element in the sequence.
Q 6 - Which of the below given sorting techniques has highest best-case runtime complexity −
Selection sort best case time complexity is Ο(n2)
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 - Heap is an example of
Heap maintains itself to meet all the requirements of complete binary tree.
Q 9 - Binary search tree is an example of complete binary tree with special attributes.
BST does not care about complete binary tree properties.
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.