You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can find the explanation here : https://youtu.be/Gf0fpGE83r4
int marsExploration(string s) { int result = 0; string base = "SOS"; for(int i = 0; i < s.size(); i++) if(s[i] != base[i%3]) result++; return result; }
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 →
Here is my c++ solution, you can find the explanation here : https://youtu.be/Gf0fpGE83r4