Leetcode(21)
-
[LeetCode] 49. Group Anagrams
https://leetcode.com/problems/group-anagrams/ Group Anagrams - 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 내 풀이 class Solution: def groupAnagrams(self, strs: List[str]) -> List[List[str]]: anagrams = [] sorted_words = [] for word in strs: sorted_words.append(sorted(','.join(wor..
2021.01.06 -
[LeetCode] 937. Reorder Data in Log Files
https://leetcode.com/problems/reverse-string/submissions/ 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 내 풀이 class Solution: def reorderLogFiles(self, logs: List[str]) -> List[str]: char_log: str = [] int_log: str = [] # 문자, 숫자로그 판별 for s in logs: if s.split()[1]..
2021.01.04 -
[LeetCode] 344. Reverse String
https://leetcode.com/problems/reverse-string/submissions/ 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 내 풀이 class Solution: def reverseString(self, s: List[str]) -> None: i = len(s) // 2 while i > 0: s[i-1], s[len(s)-i] = s[len(s)-i], s[i-1] i -= 1 "리턴 없이 리스트 내부..
2021.01.04