You need to sign in or sign up before continuing.×
Ad
  • Default User Avatar

    I think it's pretty obvious your old solution resets the index at the first match and begins counting from 0 from after it (since the second o is index 2 with respect to the letter after the first o, if it were considered index 0). Can't confirm because it seems you've changed the answer eventually. Please try to be more helpful with your questions next time and specify your language, etc.