Which sorting algorithm performs the worst when the input array is nearly sorted?
- ABubble Sort
- BInsertion Sort
- CHybrid Sort
- DMax Sort
Correct answer: B
Explanation
As per the official answer key, the answer is Insertion Sort. (Note: in theory insertion sort is fast on nearly sorted input, so this key is debatable.) Discussion 0
Nobody has replied yet. Start the discussion!