일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 파이썬알고리즘풀기
- python 알고리즘
- 상가수익률계산기
- binary search
- LeetCode
- 파이썬 알고리즘
- leetcode풀기
- 파이썬알고리즘
- 파이썬릿코드
- 릿코드
- python sorted
- 릿코드 풀기
- 파이썬 릿코드
- 릿코드풀이
- python priority queue
- 알고리즘풀기
- 파이썬릿코드풀기
- python xor
- 잇츠디모
- 릿코드풀기
- leetcode풀이
- 릿코드 파이썬
- 파이썬 알고리즘 풀기
- 파이썬 프로그래머스
- python zip_longest
- 알고리즘풀이
- 코틀린기초
- leetcode 풀기
- python Leetcode
- python 릿코드
- Today
- Total
목록python 알고리즘 (17)
소프트웨어에 대한 모든 것

662. Maximum Width of Binary Tree https://leetcode.com/problems/maximum-width-of-binary-tree/ Maximum Width 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) 재귀 문제에 대한 이해를 확실히 하지 못해서 많이 헤맸습니다. 문제가 원하는 바를 다시 정리하자면, "바이너리 트리에서 모든 레벨에서의 최대 폭을 리턴하는 것'입니다. 문제를 해..

200. Number of Islands https://leetcode.com/problems/number-of-islands/ Number of Islands - 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 class Solution(object): def numIslands(self, grid): """ :type grid: List[List[str]] :rtype: int """ m,n = len(grid), len(grid[0]..

692. Top K Frequent Words https://leetcode.com/problems/top-k-frequent-words/ Top K Frequent Words - 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) sorted() 다중 정렬 sorted() 함수의 다중 정렬을 사용하면 문제를 쉽게 해결할 수 있습니다. class Solution(object): def topKFrequent(self, words, k): """ :t..

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..

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(..

1356. Sort Integers by The Number of 1 Bits https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/ Sort Integers by The Number of 1 Bits - 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 sortByBits(self, arr: List[int]) -> List[int]: d = ..

540. Single Element in a Sorted Array https://leetcode.com/problems/single-element-in-a-sorted-array/ Single Element in a Sorted 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) - hash 사용 단 하나의 elemnt를 제외하고 모든 원소들은 두 번 등장합니다. hash 자료구조에 처음 나오는 element를 저장하고, 두 번째 등..