You are viewing a single comment's thread. Return to all comments →
swift
func marsExploration(s: String) -> Int { var changed = 0 for (index, c) in s.enumerated() { switch index % 3 { case 0, 2: if c != "S" { changed = changed + 1 } case 1: if c != "O" { changed = changed + 1 } default: break } } return changed }
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 →
swift