Write a method to replace all spaces in a string with
%20. The string is given in a characters array, you can assume it has enough space for replacement and you are given the true length of the string.
You code should also return the new length of the string after replacement.
Given "Mr John Smith",
length = 13.
The string after replacement should be
If you are using Java or Python, please use characters array instead of string.
Do it in-place.