Reverse String
- python
Problem URL:Reverse String
My Solution
Python
Modified In-Place.
def reverseString(s: List[str]) -> None:
for i in range(len(s)//2):
s[i], s[-(i+1)] = s[-(i+1)], s[i]
Let's Connect
Twitter •GitHub •LinkedInProblem URL:Reverse String
Modified In-Place.
def reverseString(s: List[str]) -> None:
for i in range(len(s)//2):
s[i], s[-(i+1)] = s[-(i+1)], s[i]
Let's Connect
Twitter •GitHub •LinkedIn