You are viewing a single comment's thread. Return to all comments →
Herw my java code:
public static int marsExploration(String s) { int count = 0; char[] ch = s.toCharArray(); for(int i=0; i<s.length(); i+=3) { if(ch[i] !='S') count++; if(ch[i+1] !='O') count++; if(ch[i+2] !='S') count++; } return count; }
Seems like cookies are disabled on this browser, please enable them to open this website
Mars Exploration
You are viewing a single comment's thread. Return to all comments →
Herw my java code: