[TIL] 정글 99일차 - 나만의 무기

신승준·2022년 7월 7일
0

알고리즘

  • 문자열 조작
      1. Reverse String
class Solution:
    def reverseString(self, s: List[str]) -> None:
        left = 0
        right = len(s) - 1
        
        while left < right:
            s[left], s[right] = s[right], s[left]
            
            left += 1
            right -= 1
            
        return s

언어

JavaScript


궁금한 점

하루를 마치고

profile
메타몽 닮음 :) email: alohajune22@gmail.com

0개의 댓글