You are viewing a single comment's thread. Return to all comments →
Important points to note in this solution.
1)the first element of array a will always remain zero since 1<= a <=b <=n;
2)the second element of array a is the second element of the array after m operations.