일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Decorator
- 시바견
- 컴퓨터의 구조
- LeetCode
- Protocol
- 30. Substring with Concatenation of All Words
- 43. Multiply Strings
- Regular Expression
- Convert Sorted List to Binary Search Tree
- 파이썬
- data science
- Python Implementation
- Class
- Python
- concurrency
- t1
- Python Code
- iterator
- attribute
- 715. Range Module
- kaggle
- shiba
- 315. Count of Smaller Numbers After Self
- 프로그래머스
- 밴픽
- 운영체제
- DWG
- Generator
- Substring with Concatenation of All Words
- 109. Convert Sorted List to Binary Search Tree
Archives
- Today
- Total
목록350. Intersection of Two Arrays II (1)
Scribbling
LeetCode: 350. Intersection of Two Arrays II
Using double counters. class Solution: def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]: from collections import Counter c1 = Counter(nums1) c2 = Counter(nums2) ret = [] for k in c2.keys(): ret.extend([k] * min(c1[k], c2[k])) return ret
Computer Science/Coding Test
2022. 1. 10. 22:04