일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 시바견
- data science
- 프로그래머스
- Python Implementation
- 운영체제
- 파이썬
- Python Code
- concurrency
- Python
- 밴픽
- 715. Range Module
- 43. Multiply Strings
- 109. Convert Sorted List to Binary Search Tree
- 30. Substring with Concatenation of All Words
- LeetCode
- t1
- DWG
- kaggle
- attribute
- Regular Expression
- 315. Count of Smaller Numbers After Self
- shiba
- Decorator
- Class
- Protocol
- Generator
- Substring with Concatenation of All Words
- 컴퓨터의 구조
- Convert Sorted List to Binary Search Tree
- iterator
Archives
- Today
- Total
목록4Sum II (1)
Scribbling
LeetCode: 454. 4Sum II
First thing to try is iterating nums1, nums2, nums3 and looking for the corresponding element in nums4. This will result in O(N**3) time complexity, which raises TLE. class Solution: def fourSumCount(self, nums1: List[int], nums2: List[int], nums3: List[int], nums4: List[int]) -> int: from collections import Counter c = Counter(nums4) ret = 0 for n1 in nums1: for n2 in nums2: for n3 in nums3: re..
Computer Science/Coding Test
2022. 1. 16. 14:15