- 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

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# 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.

Q 1 - Which of the following usees FIFO method

### Answer : A

### Explanation

Queue maintains two pointers − front and rear. In queue data structure, the item inserted first will always be removed first, hence FIFO!

### Answer : B

### Explanation

Expression notations are not reverse (or so) of each other, rather operators used in the expression have different arrangements.

### Answer : D

### Explanation

Minimum number of queues required for priority queue implementation is two. One for storing actual data and one for storing priorities.

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

### Answer : B

### Explanation

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

Q 5 - An algorithm is

A - a piece of code to be executed.

B - a loosely written code to make final code.

### Answer : C

### Explanation

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

Q 6 - Which of the below given sorting techniques has highest best-case runtime complexity −

### Answer : B

### Explanation

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 −

### Answer : C

### Explanation

Array in C are static and cannot be shrinked or expanded in run-time.

Q 8 - In C programming, when we remove an item from bottom of the stack, then −

### Answer : B

### Explanation

Stack can only be accessed from top of it.

Q 9 - Access time of a binary search tree may go worse in terms of time complexity upto

### Answer : C

### Explanation

At maximum, BST may need to search all n values in the tree in order to access an element, hence, Ο(n).

Q 10 - A stable sorting alrithm −

B - does not run out of memory.

### Answer : C

### Explanation

A stable sorting algorithm like bubble sort, does not change the sequence of appearance of similar element in the sorted list.