일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 운영체제
- iterator
- 프로그래머스
- Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- 밴픽
- data science
- 109. Convert Sorted List to Binary Search Tree
- Python Code
- attribute
- 43. Multiply Strings
- 315. Count of Smaller Numbers After Self
- shiba
- Substring with Concatenation of All Words
- Decorator
- Regular Expression
- 시바견
- Class
- t1
- DWG
- 파이썬
- Generator
- kaggle
- Protocol
- concurrency
- Python Implementation
- LeetCode
- 715. Range Module
- 30. Substring with Concatenation of All Words
- Python
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