import java.util.*; public class Solution { public int[] solve (int n, int m, int[] a) { m = m % n; reverse(a, 0, n - 1); reverse(a, 0, m - 1); reverse(a, m, n - 1); return a; } public void reverse(int[] a, int l, int r){ while(l < r...