Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- Database
- 오블완
- 데베
- Mesh
- LeetCode
- meshgraphnet
- SQL
- DS
- 컴퓨터사이언스
- 데이터
- CNN
- Python
- 자료구조
- 개발자
- GNN
- 티스토리챌린지
- 코테
- CS
- coding
- sort
- Leet Code
- 대학생
- db
- adaptive remeshing
- Data_Structure
- code
- 컴퓨터공학
- 코딩테스트
- 데이터베이스
- mysql
Archives
- Today
- Total
sy1214ei 님의 블로그
[Leet Code] 349. Intersection of Two Array 본문
class Solution:
def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:
arr = []
nums1 = set(nums1); nums2 = set(nums2)
for num in nums1:
if num in nums2:
arr.append(num)
return arr'[Coding]' 카테고리의 다른 글
| [Leet Code] 414. Third Maximum Number (1) | 2024.11.25 |
|---|---|
| [Leet Code] 350. Intersection of Two Arrays II (0) | 2024.11.25 |
| [Leet Code] 217. Con tains Duplicate (3) | 2024.11.25 |
| [Leet Code] 56. Merge Intervals (0) | 2024.11.24 |
| [Leet Code] 179. Largest Number (0) | 2024.11.24 |