You are viewing a single comment's thread. Return to all comments →
Why is this code wrong ?
for(int i=0;i<s.length();i++){ if(s.charAt(i)==s.charAt(i+1)){ s=s.substring(0,i)+s.substring(i+2); i=0; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Super Reduced String
You are viewing a single comment's thread. Return to all comments →
Why is this code wrong ?