ArtOfCode.org
Toggle Menu
Home
Online Rust Compiler
Tutorials
Algorithms 101
Html Css Tutorial
Javascript Tutorial
Blog
All Posts
Sorting Algorithms Essentials
Test knowledge of sorting techniques.
1. What is the average-case time complexity of Quick Sort?
O(n)
O(n log n)
O(n²)
O(log n)
2. Which sorting algorithm uses a 'divide and conquer' approach?
Bubble Sort
Merge Sort
Insertion Sort
Selection Sort
3. Which algorithm repeatedly swaps adjacent elements if they are in the wrong order?
Merge Sort
Quick Sort
Bubble Sort
Heap Sort
4. What is the best-case time complexity of Insertion Sort?
O(n)
O(n log n)
O(n²)
O(1)
5. Which of the following is NOT a comparison-based sorting algorithm?
Quick Sort
Merge Sort
Radix Sort
Heap Sort
6. What is the space complexity of Merge Sort?
O(1)
O(n)
O(log n)
O(n log n)
7. Which algorithm uses recursive partitioning around a pivot element?
Insertion Sort
Quick Sort
Selection Sort
Bubble Sort
8. What is the worst-case time complexity of Heap Sort?
O(n)
O(n log n)
O(n²)
O(1)
9. Which of the following are stable sorting algorithms?
Bubble Sort
Quick Sort
Merge Sort
Insertion Sort
10. Which algorithms have an average-case time complexity of O(n log n)?
Merge Sort
Quick Sort
Bubble Sort
Heap Sort
11. Which are considered in-place sorting algorithms (O(1) or O(log n) auxiliary space)?
Quick Sort
Merge Sort
Heap Sort
Insertion Sort
12. Which algorithms perform well on nearly sorted arrays?
Bubble Sort
Insertion Sort
Quick Sort
Merge Sort
13. Which are non-comparison-based sorting algorithms?
Radix Sort
Counting Sort
Bucket Sort
Merge Sort
14. Bubble Sort is more efficient than Merge Sort for large datasets.
True
False
15. Standard Quick Sort implementations are stable.
True
False
16. Insertion Sort is suitable for small datasets.
True
False
17. Heap Sort maintains stability for equal elements.
True
False
18. Name the sorting algorithm that builds a sorted array by inserting each element into its correct position one at a time.
19. What sorting algorithm uses a binary heap to repeatedly extract the maximum element and build the sorted array?
20. What term describes a sorting algorithm that preserves the relative order of equal elements?
Reset
Answered 0 of 0 — 0 correct