1
2
3
4
5
6
|
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
s.reverse()
|
cs |
내장함수 reverse() 쓰면됩니당
반응형
'python-algorithm' 카테고리의 다른 글
Leetcode 4. Median of Two Sorted Arrays (0) | 2021.08.19 |
---|---|
Leetcode 1822. Sign of the Product of an Array (0) | 2021.08.19 |
Leetcode 1832. Check if the Sentence Is Pangram (0) | 2021.08.17 |
Leetcode 1662. Check If Two String Arrays are Equivalent (0) | 2021.08.17 |
Leetcode 709. To Lower Case (0) | 2021.08.17 |
댓글