
How would you replace all spaces in a string with '%20', given that the string has enough trailing space to accommodate the changes?
Approach To answer the interview question, "How would you replace all spaces in a string with '%20', given that the string has enough trailing space to accommodate the changes?" , follow a structured framework that includes the following steps: Understand…








