Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the first step in the insertion sort algorithm?
Think about how you would position cards when sorting.
In which scenarios does insertion sort perform best?
Consider how sorting affects the number of comparisons made.
What is the average time complexity of insertion sort?
Recall the lessons on sorting complexities we've covered.
True or False: Insertion sort can perform faster than selection sort when data is nearly sorted.
Think about how many moves an already sorted array would require.
Given the array [12, 11, 13, 5, 6], describe the steps taken by insertion sort.
Visualize how each number navigates through the sorted section.
How will insertion sort behave if the array is initially sorted? Explain your reasoning.
Consider how many comparisons or movements would occur in the best-case scenario.
4 more questions in this section. Enroll free to practise them all.
Enroll free