You are viewing a single comment's thread. Return to all comments →
solution pass 100%: ** note: don’t change row, just add some characters
Arrays.sort(a); int mid = (n + 1)/2-1; // issue 1 int temp = a[mid]; a[mid] = a[n - 1]; a[n - 1] = temp; int st = mid + 1; int ed = n - 2; // issue 2 while(st <= ed){ temp = a[st]; a[st] = a[ed]; a[ed] = temp; st = st + 1; ed = ed - 1; // issue 3 }
Seems like cookies are disabled on this browser, please enable them to open this website
Zig Zag Sequence
You are viewing a single comment's thread. Return to all comments →
solution pass 100%: ** note: don’t change row, just add some characters