- 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

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

Polish Notation

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

F_{n}= F_{n-1}+ F_{n-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?

A - very expensive in terms of memory.

C - every recursive program can be written with iteration too.

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

(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 −

A - the algorithm has been tested before in real environment.

B - all other factors like CPU speed are constant and have no effect on implementation.

Efficiency of algorithm is measured by assuming that all other factors e.g. processor speed, are constant and have no effect on implementation.

data_structures_algorithms_questions_answers.htm

Advertisements