Flashcards
Reverse string
Cards in this deck (1)
- 1Reverse stringclass Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
low = 0
high = len(s) - 1
while low <= high:
temp = s[low]
s[low] = s[high]
s[high] = temp
low += 1
high -= 1
Information
- Description
- Flashcards on Reverse string, created by Suhas S on 14/09/2019.
- Created by
- Suhas S
- Views
- 1
- Rating