Identify the correct definition of Insertion sort.
- A. An optimization technique that stores the results of expensive function calls to avoid recomputing them.
- B. A sorting algorithm that builds the final sorted array one element at a time by inserting each element into its correct position. ✓
- C. A comparison-based sorting algorithm that uses a binary heap data structure to sort elements.
- D. A greedy algorithm that finds a minimum spanning tree for a connected, weighted graph by adding edges in increasing order of weight.
Correct answer
B. A sorting algorithm that builds the final sorted array one element at a time by inserting each element into its correct position.
Explanation
Insertion sort refers to a sorting algorithm that builds the final sorted array one element at a time by inserting each element into its correct position.