Flashcards
Reverse string
Flashcards do conjunto (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
Informações
- Descrição
- FlashCards sobre Reverse string, criado por Suhas S em 14-09-2019.
- Criado por
- Suhas S
- Visualizações
- 1
- Avaliação