알고리즘/파이썬 알고리즘 인터뷰 (10) 썸네일형 리스트형 [LeetCode] 344. Reverse String (문자열 조작) 문제 https://leetcode.com/problems/reverse-string/ Reverse String - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문자열을 뒤집는 함수를 만들어보자. 입력은 문자로 구성된 배열이 주어진다. ex) ['h', 'e', 'l', 'l', 'o'] 입력 배열을 in-place로 거꾸로 뒤집어야 한다. no return 내 풀이 class Solution: def reverseString(self, s: List[str.. [LeetCode] 125. Valid Palindrome (문자열 조작) 문제 https://leetcode.com/problems/valid-palindrome/ Valid Palindrome - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 모든 대문자는 소문자로 바꾸고, 알파벳과 숫자가 아닌 문자는 제거하자. 모든 가공을 거친 문자는 앞으로 읽었을 때와 뒤로 읽었을 때가 동일해야 한다. 이것을 펠린드롬이라고 한다. 주어진 문자가 펠린드롬 문자인지 구하자. 내 풀이 시간 : 43ms 주어진 문자열 s에서 알파벳 또는 숫자 형태의 .. 이전 1 2 다음