일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 파이썬 알고리즘 풀기
- 파이썬알고리즘풀기
- python zip_longest
- 잇츠디모
- 파이썬릿코드풀기
- python 릿코드
- 릿코드풀이
- python xor
- leetcode 풀기
- python priority queue
- 릿코드풀기
- 파이썬알고리즘
- 알고리즘풀이
- 상가수익률계산기
- 알고리즘풀기
- python sorted
- 파이썬 릿코드
- 코틀린기초
- python Leetcode
- binary search
- 파이썬 알고리즘
- 파이썬릿코드
- 릿코드
- leetcode풀이
- python 알고리즘
- 릿코드 풀기
- LeetCode
- 릿코드 파이썬
- 파이썬 프로그래머스
- leetcode풀기
- Today
- Total
목록python Leetcode (53)
소프트웨어에 대한 모든 것
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..
965. Univalued Binary Tree https://leetcode.com/problems/univalued-binary-tree/ Univalued 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) Recursive # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # s..
1022. Sum of Root To Leaf Binary Numbers https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers/ Sum of Root To Leaf Binary Numbers - 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) 재귀 # Definition for a binary tree node. # class TreeNode: # def __init__(self, v..
382. Linked List Random Node https://leetcode.com/problems/linked-list-random-node/ Linked List Random Node - 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(1) 공간복잡도 : O(n) # Definition for singly-linked list. # class ListNode: # def __init__(self, ..
67. Add Binary https://leetcode.com/problems/add-binary/ Add Binary - 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 addBinary(self, a: str, b: str) -> str: a = list(map(int, a)) b = list(map(int, b)) res = '' carry = 0 while a or b or carry: if..
1094. Car Pooling https://leetcode.com/problems/car-pooling/ Car Pooling - 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(object): def carPooling(self, trips, capacity): """ :type trips: List[List[int]] :type capacity: int :rtype: bool """ d = defaultdict(..
997. Find the Town Judge https://leetcode.com/problems/find-the-town-judge/ Find the Town Judge - 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) 문제 설명: 1) 타운 판사는 아무도 믿지 않는다 2) 타운 판사를 제외하고 모든 사람은 타운 판사를 믿지 않는다 1)과 2) 조건을 만족하는 사람은 딱 한 명 있다 class Solution: def findJudge(sel..