You are viewing a single comment's thread. Return to all comments →
Yeah, from both ends, whichever is smaller, it get reduced to its counterPart on symmetrically oppsite side.
for(int i=0,j=c.length-1; i<c.length/2; i++,j--) count+= Math.abs(c[i]-c[j]); return count;
Seems like cookies are disabled on this browser, please enable them to open this website
The Love-Letter Mystery
You are viewing a single comment's thread. Return to all comments →
Yeah, from both ends, whichever is smaller, it get reduced to its counterPart on symmetrically oppsite side.