Recall & Review
beginner
What is comparison based sorting?
Sorting methods that decide the order by comparing elements with each other, like checking if one is bigger or smaller than another.
Click to reveal answer
beginner
Name two common comparison based sorting algorithms.
Bubble Sort and Quick Sort are examples where elements are compared to sort the list.
Click to reveal answer
beginner
What is non comparison based sorting?
Sorting methods that do not compare elements directly but use other properties like counting or digit positions to sort.
Click to reveal answer
beginner
Give an example of a non comparison based sorting algorithm.
Counting Sort is a non comparison based method that counts occurrences to sort elements.
Click to reveal answer
intermediate
Why can non comparison based sorting be faster than comparison based sorting?
Because they use direct information like counts or digit positions, they can sort in linear time for certain data, unlike comparison sorts which need at least n log n steps.
Click to reveal answer
Which sorting method uses direct element comparisons?
✗ Incorrect
Comparison based sorting relies on comparing elements to decide order.
Which algorithm is an example of non comparison based sorting?
✗ Incorrect
Counting Sort uses counts of elements instead of comparisons.
What is the best time complexity lower bound for comparison based sorting?
✗ Incorrect
Comparison based sorting cannot be faster than O(n log n) in the general case.
Which sorting type can achieve linear time sorting under certain conditions?
✗ Incorrect
Non comparison based sorting like Counting Sort can run in O(n) time if data fits constraints.
Radix Sort is an example of which sorting category?
✗ Incorrect
Radix Sort sorts numbers by digits without direct comparisons.
Explain the main difference between comparison based and non comparison based sorting.
Think about how the algorithms decide order.
You got /3 concepts.
List examples of comparison based and non comparison based sorting algorithms and their typical use cases.
Consider data size and type.
You got /3 concepts.