A=[1,4,2,6,3,7,5,8] is a 2 ordered array while A=[1,4,2,5,3,6,8,7,9,10] is also a 2 ordered array… An array is called k-ordered if any one of it’s element is at most k places away from its position in the sorted array…

eg. A=[1 4 2 6 3 7 5 8]

…A=[1 2 3 4 5 6 7 8]

………[0 1 2 2 2 2 1 0] is the difference in the positions of respective elements… So it is a 2 ordered array as the max difference is 2….

A=[1 4 2 5 3 6 8 7 9 10]

A=[1 2 3 4 5 6 7 8 9 10]

…..[0 1 2 2 1 0 1 1 0 0]…. Here also the max difference is 2.. So it is also a 2 ordered array….

While [1 3 2 5 4 7 6 8] is a 1 ordered array…

**ans is A) 1**