일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 릿코드풀기
- binary search
- python sorted
- 파이썬 프로그래머스
- 파이썬 릿코드
- 파이썬알고리즘풀기
- python 릿코드
- 상가수익률계산기
- python Leetcode
- 알고리즘풀이
- LeetCode
- leetcode 풀기
- 릿코드
- python 알고리즘
- 코틀린기초
- 릿코드풀이
- python xor
- 잇츠디모
- leetcode풀기
- 파이썬 알고리즘
- leetcode풀이
- 릿코드 파이썬
- 파이썬 알고리즘 풀기
- python priority queue
- 파이썬릿코드
- 파이썬알고리즘
- 파이썬릿코드풀기
- 알고리즘풀기
- python zip_longest
- 릿코드 풀기
- Today
- Total
목록알고리즘 (194)
소프트웨어에 대한 모든 것
171. Excel Sheet Column Number https://leetcode.com/problems/excel-sheet-column-number/ Excel Sheet Column Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) 26진수 풀이 class Solution: def titleToNumber(self, columnTitle: str) -> int: res = 0 columnTitle = columnTitle[..
169. Majority Element https://leetcode.com/problems/majority-element/ Majority Element - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) class Solution: def majorityElement(self, nums: List[int]) -> int: half = len(nums)//2 counter = Counter(nums) for n, count in counter...
1288. Remove Covered Intervals https://leetcode.com/problems/remove-covered-intervals/ Remove Covered Intervals - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) class Solution: def removeCoveredIntervals(self, nums: List[List[int]]) -> int: count = len(nums) # 오름차순 정렬 nu..
104. Maximum Depth of Binary Tree https://leetcode.com/problems/maximum-depth-of-binary-tree/ Maximum Depth of Binary Tree - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) DFS # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, r..
389. Find the Difference https://leetcode.com/problems/find-the-difference/ Find the Difference - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) HashMap 각각의 해쉬맵 구성. 원래 문자의 hashmap에서 random 생성된 문자 해쉬맵을 하나씩 제거해나가서 최종적으로 남은 것이 추가된 문자가됩니다. class Solution: def findTheDifferen..
532. K-diff Pairs in an Array https://leetcode.com/problems/k-diff-pairs-in-an-array/ K-diff Pairs in an Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) 시간 복잡도 : O(n) class Solution: def findPairs(self, nums: List[int], k: int) -> int: counter = Counter(nums) res ..
258. Add Digits https://leetcode.com/problems/add-digits/ Add Digits - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) Straight-forward class Solution: def addDigits(self, num: int) -> int: num_to_sumnum = lambda num: sum(int(n) for n in str(num)) while True: num = num_to..
454. 4Sum II https://leetcode.com/problems/4sum-ii/ 4Sum II - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) brute-force O(n^4)으로 풀었더니 역시나 TLE(Time Limit Exceeded) 발생합니다. class Solution: def fourSumCount(self, nums1: List[int], nums2: List[int], nums3: List[int], nums4: ..