- Data Structures & Algorithms
- DSA - Home
- DSA - Overview
- DSA - Environment Setup

- Algorithm
- DSA - Algorithms Basics
- DSA - Asymptotic Analysis
- DSA - Greedy Algorithms
- DSA - Divide and Conquer
- DSA - Dynamic Programming

- Data Structures
- DSA - Data Structure Basics
- DSA - Array Data Structure

- Stack & Queue
- DSA - Stack
- DSA - Expression Parsing
- DSA - Queue

- Searching Techniques
- DSA - Linear Search
- DSA - Binary Search
- DSA - Interpolation Search
- DSA - Hash Table

- Sorting Techniques
- DSA - Sorting Algorithms
- DSA - Bubble Sort
- DSA - Insertion Sort
- DSA - Selection Sort
- DSA - Merge Sort
- DSA - Shell Sort
- DSA - Quick Sort

- Graph Data Structure
- DSA - Graph Data Structure
- DSA - Depth First Traversal
- DSA - Breadth First Traversal

- Tree Data Structure
- DSA - Tree Data Structure
- DSA - Tree Traversal
- DSA - Binary Search Tree
- DSA - AVL Tree
- DSA - Spanning Tree
- DSA - Heap

- DSA Useful Resources
- DSA - Questions and Answers
- DSA - Quick Guide
- DSA - Useful Resources
- DSA - Discussion

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 Ο(n^{2})

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.

A - BST does not care about complete binary tree properties.

B - BST takes care of complete binary tree properties.

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 −

A - data collection should be in sorted form and equally distributed.

B - data collection should be in sorted form and but not equally distributed.

C - data collection should be equally distributed but not sorted.

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

data_structures_algorithms_questions_answers.htm

Advertisements