[ LeetCode ] 819번 Most Common Word
·
Archive/Develop
leetcode.com/problems/most-common-word/ Most Common Word - 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 mostCommonWord(self, paragraph: str, banned: List[str]) -> str: #data cleansing words = [word for word in re.sub('[^\w]',' ',paragraph).lower().split() if ..
[ LeetCode ] 937번 Reorder Data in Log Files 풀이
·
Archive/Develop
leetcode.com/problems/reorder-data-in-log-files/ Reorder Data in Log Files - 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]: letters, digits = [],[] for log in logs: if log.split()[1].isdigit(): digits.append(..