Given the integer array [7, 6, 3, 5, 4, 1, 2], you apply heap sort to sort it in ascending order using a max-heap implementation.
After building the initial max-heap and performing the first extraction step (swap the root with the last element and then heapify the remaining elements), what is the resulting order of the array?
Options:
1-2-3-4-5-6-7
2-6-3-5-4-1-7
6-5-3-2-4-1-7
5-4-3-2-1-6-7
Login required