class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
l, r = 0, len(s) -1
while l< r:
s[l],s[r] = s[r],s[l]
l+=1
r-=1
return s
class Solution:
def replaceSpace(self, s: str) -> str:
res = []
for i in range(len(s)):
if s[i] ==' ':
print(res)
res.append('%20')
print("s",res)
else:
res.append(s[i])
return ''.join(res)
class Solution:
def reverseWords(self, s: str) -> str:
words = s.split()
left, right = 0, len(words)-1
while left < right:
words[left],words[right] = words[right],words[left]
left +=1
right -=1
return " ".join(words)