- 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 - Data Structures and Types
- DSA - Array Data Structure
- Linked Lists
- DSA - Linked List Basics
- DSA - Doubly Linked List
- DSA - Circular Linked List
- 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 - Red Black Trees
- DSA - B Trees
- DSA - B+ Trees
- DSA - Splay Trees
- DSA - Spanning Tree
- DSA - Tries
- DSA - Heap
- Recursion
- DSA - Recursion Basics
- DSA - Tower of Hanoi
- DSA - Fibonacci Series
- 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 one of the below is not divide and conquer approach?
Answer : B
Explanation
Among the options, only Merge sort divides the list in sub-list, sorts and then merges them together
Q 2 - A circular linked list can be used for
Answer : C
Explanation
Both stack and queue data structure can be represented by circular linked-list.
Q 3 - Find the odd out
A - Prim's Minimal Spanning Tree Algorithm
B - Kruskal's Minimal Spanning Tree Algorithm
Answer : C
Explanation
Floyd-Warshall's All pair shortest path Algorithm uses dynamic programming approach. All other mentioned algorithms use greedy programming approach
Q 4 - Which of the following searching techniques do not require the data to be in sorted form
Answer : A
Explanation
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 - Which of the following is example of in-place algorithm?
Answer : B
Explanation
Only Merge sort requires extra space.
Q 6 - Quick sort running time depends on the selection of
Answer : B
Explanation
If the pivot element is balanced, quick sort running time will be less.
Q 7 - node.next -> node.next.next;
will make
Answer : A
Explanation
After applying node.next -> node.next.next;
we will not have node.next stored anywhere if not explicitly mentioned.
Q 8 - In a min heap
A - minimum values are stored.
B - child nodes have less value than parent nodes.
Answer : C
Explanation
In a min heap, parent nodes store lesser values than child nodes. The minimum value of the entire heap is stored at root.
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.
Answer : A
Explanation
BST does not care about complete binary tree properties.
Q 10 - Which of the following algorithm does not divide the list −
Answer : A
Explanation
Linear search, seaches the desired element in the target list in a sequential manner, without breaking it in any way.