- Data Structures & Algorithms
- DSA - Home
- DSA - Overview
- DSA - Environment Setup
- DSA - Algorithms Basics
- DSA - Asymptotic Analysis
- Data Structures
- DSA - Data Structure Basics
- DSA - Data Structures and Types
- DSA - Array Data Structure
- Linked Lists
- DSA - Linked List Data Structure
- DSA - Doubly Linked List Data Structure
- DSA - Circular Linked List Data Structure
- Stack & Queue
- DSA - Stack Data Structure
- DSA - Expression Parsing
- DSA - Queue Data Structure
- Searching Algorithms
- DSA - Searching Algorithms
- DSA - Linear Search Algorithm
- DSA - Binary Search Algorithm
- DSA - Interpolation Search
- DSA - Jump Search Algorithm
- DSA - Exponential Search
- DSA - Fibonacci Search
- DSA - Sublist Search
- DSA - Hash Table
- Sorting Algorithms
- DSA - Sorting Algorithms
- DSA - Bubble Sort Algorithm
- DSA - Insertion Sort Algorithm
- DSA - Selection Sort Algorithm
- DSA - Merge Sort Algorithm
- DSA - Shell Sort Algorithm
- DSA - Heap Sort
- DSA - Bucket Sort Algorithm
- DSA - Counting Sort Algorithm
- DSA - Radix Sort Algorithm
- DSA - Quick Sort Algorithm
- Graph Data Structure
- DSA - Graph Data Structure
- DSA - Depth First Traversal
- DSA - Breadth First Traversal
- DSA - Spanning Tree
- 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 - Tries
- DSA - Heap Data Structure
- Recursion
- DSA - Recursion Algorithms
- DSA - Tower of Hanoi Using Recursion
- DSA - Fibonacci Series Using Recursion
- Divide and Conquer
- DSA - Divide and Conquer
- DSA - Max-Min Problem
- DSA - Strassen's Matrix Multiplication
- DSA - Karatsuba Algorithm
- Greedy Algorithms
- DSA - Greedy Algorithms
- DSA - Travelling Salesman Problem (Greedy Approach)
- DSA - Prim's Minimal Spanning Tree
- DSA - Kruskal's Minimal Spanning Tree
- DSA - Dijkstra's Shortest Path Algorithm
- DSA - Map Colouring Algorithm
- DSA - Fractional Knapsack Problem
- DSA - Job Sequencing with Deadline
- DSA - Optimal Merge Pattern Algorithm
- Dynamic Programming
- DSA - Dynamic Programming
- DSA - Matrix Chain Multiplication
- DSA - Floyd Warshall Algorithm
- DSA - 0-1 Knapsack Problem
- DSA - Longest Common Subsequence Algorithm
- DSA - Travelling Salesman Problem (Dynamic Approach)
- Approximation Algorithms
- DSA - Approximation Algorithms
- DSA - Vertex Cover Algorithm
- DSA - Set Cover Problem
- DSA - Travelling Salesman Problem (Approximation Approach)
- Randomized Algorithms
- DSA - Randomized Algorithms
- DSA - Randomized Quick Sort Algorithm
- DSA - Karger’s Minimum Cut Algorithm
- DSA - Fisher-Yates Shuffle Algorithm
- DSA Useful Resources
- DSA - Questions and Answers
- DSA - Quick Guide
- DSA - Useful Resources
- DSA - Discussion
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!
Q 2 - What data structure is used for breadth first traversal of a graph?
Answer : A
Explanation
Queue is used for breadth first traversal whereas stack is used for depth first traversal.
Q 3 - The following formula will produce
Fn = Fn-1 + Fn-2
Answer : B
Explanation
Fibonacci Series generates subsequent number by adding two previous numbers.
Q 4 - Maximum degree of any vertex in a simple graph of vertices n is
Answer : D
Explanation
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 −
Answer : C
Explanation
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 - Time required to merge two sorted lists of size m and n, is
Answer : B
Explanation
The time required to merge two sorted list is Ο(m + n).
Q 7 - If queue is implemented using arrays, what would be the worst run time complexity of queue and dequeue operations?
Answer : D
Explanation
As queue is maintained by two separate pointers for queue and dequeue operations, the run time for both is Ο(1).
Q 8 - In the deletion operation of max heap, the root is replaced by
A - next available value in the left sub-tree.
B - next available value in the right sub-tree.
Answer : D
Explanation
Regardless of being min heap or max heap, root is always replaced by last element of the last level.
Q 9 - A balance factor in AVL tree is used to check
B - if all child nodes are at same level.
Answer : D
Explanation
The balance factor (BalanceFactor = height(left-sutree) − height(right-sutree)) is used to check if the tree is balanced or unbalanced.
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.
Answer : A
Explanation
For this algorithm to work properly the data collection should be in sorted form and equally distributed.
To Continue Learning Please Login
Login with Google