Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

URLify

Write a method to replace all spaces in a string with "%20". You may assume that the string has sufficient space at the end to hold additional characters, and that you are given the "true" length of the string. (Note: if implementing in Java, please use a character array so that you can perform this operation in place.)

Solutions:

Swift

O(n) and O(n) memory

C++

O(n) - works in place

Installation

Run make to build and run C++ files and run Swift files. Or you can run .playground file.