일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 30. Substring with Concatenation of All Words
- Python
- LeetCode
- Protocol
- 프로그래머스
- 운영체제
- 밴픽
- 43. Multiply Strings
- DWG
- Python Implementation
- 파이썬
- 315. Count of Smaller Numbers After Self
- t1
- iterator
- Generator
- 컴퓨터의 구조
- shiba
- attribute
- kaggle
- Regular Expression
- 시바견
- Python Code
- concurrency
- data science
- 109. Convert Sorted List to Binary Search Tree
- 715. Range Module
- Substring with Concatenation of All Words
- Convert Sorted List to Binary Search Tree
- Class
- Decorator
Archives
- Today
- Total
목록Group Anagrams (1)
Scribbling
LeetCode: 49. Group Anagrams
class Solution: def groupAnagrams(self, strs: List[str]) -> List[List[str]]: from collections import defaultdict dic = defaultdict(list) for s in strs: counter = [0] * 26 for char in s: counter[ord(char) - ord('a')] += 1 dic[tuple(counter)].append(s) return [x for x in dic.values()]
Computer Science/Coding Test
2021. 9. 8. 17:01