You are viewing a single comment's thread. Return to all comments →
function marsExploration(s) { let sos=["S","O","S"] var count=0; for(let i=0;i<=s.length;i+=3){ let sub=s.substring(i,i+3); for(let j=0;j<sub.length;j++){ if(sub[j]!==sos[j]){ 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 →