Insertion sort MCQsBy: Prof. Dr. Fazal Rehman | Last updated: May 15, 2025 20 Score: 0 Attempted: 0/20 Subscribe 1. : What is the primary function of Insertion Sort? (A) To search for an element (B) To sort an array (C) To merge two arrays (D) To partition data 2. : What is the worst-case time complexity of Insertion Sort? (A) O(n) (B) O(n log n) (C) O(n^2) (D) O(log n) 3. : Which statement best describes how Insertion Sort works? (A) It divides the array into sorted and unsorted portions and inserts elements into the sorted portion. (B) It compares adjacent elements and swaps them. (C) It selects the smallest element and places it at the beginning. (D) It merges two sorted lists into one. 4. : What is the best-case time complexity of Insertion Sort? (A) O(n) (B) O(n log n) (C) O(n^2) (D) O(log n) 5. : Which of the following is true about the stability of Insertion Sort? (A) It is a stable sorting algorithm. (B) It is not a stable sorting algorithm. (C) It can only sort numerical data. (D) It requires additional memory for stability. 6. : What is the average-case time complexity of Insertion Sort? (A) O(n) (B) O(n log n) (C) O(n^2) (D) O(log n) 7. : In Insertion Sort, what happens to the elements in the sorted portion of the array? (A) They are ignored until the next pass. (B) They are rearranged randomly. (C) They are compared and shifted as necessary. (D) They are selected one by one to find the minimum. 8. : How many comparisons are made in the worst case during Insertion Sort? (A) n (B) n/2 (C) n^2 (D) n(n-1)/2 9. : What is the space complexity of Insertion Sort? (A) O(1) (B) O(n) (C) O(n log n) (D) O(n^2) 10. : In which of the following scenarios is Insertion Sort particularly useful? (A) Sorting large datasets (B) Sorting small datasets (C) Real-time data processing (D) When memory usage is a concern 11. : What is the effect of using Insertion Sort on an already sorted array? (A) It sorts the array again. (B) It remains unchanged. (C) It becomes unstable. (D) It reverses the array. 12. : How does Insertion Sort achieve its sorting? (A) By merging elements (B) By comparing and shifting (C) By swapping elements (D) By selecting elements randomly 13. : Which algorithm is generally more efficient than Insertion Sort for larger datasets? (A) Bubble Sort (B) Merge Sort (C) Quick Sort (D) All of the above 14. : What will be the result of applying Insertion Sort to the array [4, 3, 2, 1]? (A) [1, 2, 3, 4] (B) [4, 3, 2, 1] (C) [2, 1, 3, 4] (D) [3, 4, 1, 2] 15. : What type of sorting is Insertion Sort classified as? (A) In-place sorting (B) External sorting (C) Comparison-based sorting (D) All of the above 16. : Which characteristic of Insertion Sort makes it less suitable for large datasets? (A) It requires too much memory. (B) It makes too many comparisons. (C) It requires multiple passes through the array. (D) It is not adaptive. 17. : What is the output of Insertion Sort if the input array is [5, 2, 9, 1, 5, 6]? (A) [1, 2, 5, 5, 6, 9] (B) [5, 5, 6, 1, 2, 9] (C) [2, 1, 5, 6, 9, 5] (D) [9, 6, 5, 5, 2, 1] 18. : How does Insertion Sort handle duplicate elements? (A) It ignores them. (B) It sorts them randomly. (C) It maintains their relative order. (D) It treats them as distinct values. 19. : What will be the result of applying Insertion Sort to the array [3, 1, 4, 1, 5, 9, 2, 6]? (A) [1, 1, 2, 3, 4, 5, 6, 9] (B) [4, 1, 3, 2, 5, 9, 6, 1] (C) [3, 4, 1, 1, 2, 5, 6, 9] (D) [9, 6, 5, 4, 3, 2, 1, 1] 20. : What is the final position of the smallest element after one pass of Insertion Sort? (A) It remains in its original position. (B) It is placed at the end of the array. (C) It is placed at the beginning of the sorted portion. (D) It is moved to the middle of the array. Data Structures MCQs Basic Concepts Introduction to Data Structures Abstract Data Types (ADT) MCQs Complexity Analysis MCQs Time complexity MCQs Space complexity MCQs Big O, Big Ω, Big Θ notations MCQs Linear Data Structures MCQs Arrays MCQs One-dimensional arrays MCQs Multi-dimensional arrays MCQs Operations: traversal, insertion, deletion MCQs Linked Lists MCQs Singly linked list MCQs Doubly linked list MCQs Circular linked list MCQs Stacks MCQs Stack operations (push, pop, peek) MCQs Applications of stacks (expression evaluation, recursion) MCQs Queues MCQs Queue operations (enqueue, dequeue, front, rear) MCQs Types: Simple queue, circular queue, priority queue, deque MCQs Non-Linear Data Structures MCQs Trees MCQs Binary trees MCQs Binary Search Trees (BST) MCQs AVL Trees MCQs B-trees and B+ trees MCQs Tree traversal methods (in-order, pre-order, post-order) MCQs Heaps MCQs Min-heap MCQs Max-heap MCQs Heap operations (insertion, deletion, heapify) MCQs Applications of heaps (priority queues, heap sort) MCQs Graphs MCQs Graph representation (adjacency matrix, adjacency list) MCQs Graph traversal algorithms (DFS, BFS) MCQs Shortest path algorithms (Dijkstra’s, Bellman-Ford) MCQs Minimum Spanning Tree (Kruskal’s, Prim’s) MCQs Hashing MCQs MCQs Hash Tables Hash functions MCQs Collision resolution techniques (chaining, open addressing) MCQs Applications of hashing MCQs Sorting and Searching Algorithms MCQs Sorting Algorithms MCQs Bubble sort MCQs Selection sort MCQs Insertion sort MCQs Merge sort MCQs Quick sort MCQs Heap sort MCQs Searching Algorithms MCQs Linear search MCQs Binary search MCQs Interpolation search MCQs Miscellaneous Memory Management in data structures MCQs Dynamic memory allocation MCQs Garbage collection MCQs String Manipulation Algorithms MCQs Pattern matching (KMP, Rabin-Karp) MCQs String hashing MCQs Data Structures MCQs 1 Data Structures MCQs 2 Data Structures MCQs 3 Data Structures MCQs 4 Data Structures MCQs 5 Stacks Solved MCQs Queues MCQs pointer mcqs Array MCQs Related Posts:Program to Implement Insertion Sort in CPP (C plus plus)Insertion Sort Program with array in PHPInsertion sort in JavaScript Implementation Algorithm and Pseudocodewrite a c program to sort a 1d array using pointer by applying bubble sort techniqueOperations: traversal, insertion, deletion MCQsHeap operations (insertion, deletion, heapify) MCQs