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