[leetcode-344] ReverseString
ยท
๐ข One step
LeetCode-344 ReverseString : ๋ฌธ์์ด ๋ฆฌ์คํธ ๋ค์ง๊ธฐ ๋ฆฌํด ์์ด ๋ฆฌ์คํธ ๋ด๋ถ์ ์ฃผ์ ๊ฐ์ด ๋ณํ๋๋ก my answer class Solution: def reverseString(self, s: List[str]) -> None: """ Do not return anything, modify s in-place instead. """ for i in range(len(s)): s.append(s.pop(-i-1)) Result : 394 Memory: 18.4mb 1. ํฌ ํฌ์ธํธ ์ค์ {code} Result : 205 Memory: 18.5mb