Final answer:
Insertion sort requires n-1 passes to sort an array of n elements, where each pass involves inserting an element into its correct position in the sorted section of the array.
Step-by-step explanation:
The question asks about the number of passes required by the insertion sort algorithm to sort an array of n elements. Insertion sort is a comparison-based sorting algorithm that builds the final sorted array one item at a time. It requires n-1 passes to sort an array of n elements. During each pass, the algorithm picks the next element and inserts it into its correct position in the already-sorted section of the array.
In the worst-case scenario, where the array is in reverse order, the inner loop of insertion sort compares each element with all other elements in the sorted section which amounts to roughly n(n-1)/2 comparisons. Now, considering the expression n² described in the question, after applying a mathematical simplification, you end up with 2n². This n² term is not directly related to the number of passes but rather to the number of comparisons in the worst-case scenario. The number of passes however, is still n-1 regardless of the array's initial order.