Data Structures and Algorithms Flashcards
7 cards from real ICC practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Data Structures and Algorithms flashcards as text
Which sorting algorithm has a worst-case time complexity of O(n log n)?
Answer: Merge Sort
Merge Sort guarantees O(n log n) in all cases by repeatedly dividing and merging subarrays.
What is the best-case time complexity of Bubble Sort?
Answer: O(n)
With an already-sorted array, Bubble Sort with an early-exit flag runs in O(n) — one pass with no swaps.
Quick Sort selects a 'pivot' element and then:
Answer: Partitions elements into those less than and greater than the pivot
Quick Sort partitions the array around the pivot so all smaller elements are on the left and larger ones on the right.
Which of the following sorting algorithms is NOT comparison-based?
Answer: Radix Sort
Radix Sort distributes elements into buckets by digit value, bypassing direct element comparisons.
Insertion Sort is most efficient when the input data is:
Answer: Nearly sorted
Nearly sorted input minimizes the number of shifts required, making Insertion Sort approach O(n) performance.
What additional data structure does Heap Sort use to achieve O(n log n) complexity?
Answer: Binary Heap
Heap Sort builds a binary heap from the input and repeatedly extracts the maximum to produce a sorted array.
Which sorting algorithm is stable by default, preserving the relative order of equal elements?
Answer: Merge Sort
Merge Sort is stable because it always picks left-side elements first when two values are equal during merging.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- iccsafe.org — Retake policy, score release, renewal, score validity, test delivery, passing score, exam format, time limit · verified Oct 2026
- shop.iccsafe.org — Fees · verified Oct 2026