THE TEAL PICKLE CODING CHALLENGE!! Replace all spaces on a string with β%20'. I solved this problem with my lover, Swift. TRY IT π
For further actions, you may consider blocking this person and/or reporting abuse


Top comments (2)
Uhhh...
Or if you wanna go all in:
(Snippets are in Python because I donβt know Swift)
Yeah in Swift 5 the syntax is pretty similar
string.replaceOccurrences(of: β β, with: β%20β)
In everyday practice, I def use that method.
Typically in interviews, interviewers want to see whether the interviewee understands/can derive the algorithm which makes that method work (hence, all the code π¬π)