Solution to Expand Spaces from Jobdu

30 Jul

Question (in Chinese):

Question Name: Expand Spaces

Question Description: giving a string, expand all spaces into “%20”.

Input: a single line as the original string.

Output: the expanded string.


It is completely the same as the problem 1.4 in Cracking the Coding Interview.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please put your code into a <pre>YOUR CODE</pre> section. Thanks and Happy Coding!