一道国外教材的算法题
Given an array A[0..n-1] and a small constant k. Suppose that array A at the beginning is " nearly sorted" such that for every element A[i] at most k elements to the left of A[i] are greater than A[i]. We define such a sequence to be k-near-sorted. For example the following sequence is 2-near-sorted:[8,1,2,7,3,4,5,6]
a. Write an efficient algorithm for completely sorting an array A which is k-near-sorted.
b. What is the time complexity of the algorithm in terms of n and k.
c. illustrate the algorithm for the sequence below, where k=2.
[8,1,2,7,3,4,5,6]
题目是说的什么意思啊,我都没看明白