일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- leetcode풀이
- 릿코드풀이
- leetcode풀기
- python 알고리즘
- LeetCode
- leetcode 풀기
- python Leetcode
- 파이썬릿코드풀기
- 파이썬알고리즘
- 릿코드 파이썬
- python priority queue
- 파이썬릿코드
- 릿코드
- python zip_longest
- 상가수익률계산기
- 릿코드 풀기
- 파이썬 알고리즘
- 잇츠디모
- 코틀린기초
- python sorted
- 알고리즘풀이
- 파이썬알고리즘풀기
- 파이썬 프로그래머스
- python xor
- 알고리즘풀기
- 릿코드풀기
- 파이썬 알고리즘 풀기
- binary search
- python 릿코드
- 파이썬 릿코드
- Today
- Total
목록알고리즘/LeetCode (177)
소프트웨어에 대한 모든 것
441. Arranging Coins 제목 문제) 솔루션1) class Solution: def arrangeCoins(self, n: int) -> int: row = 0 while n > 0: n -= row + 1 row += 1 if n == 0: return row elif n < 0: return row -1
260. Single Number III https://leetcode.com/problems/single-number-iii/ Single Number III - 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 or HashSet 자료구조를 통해서 중복을 제거하고 single number만 남겨서 문제를 해결한다. 아래 코드에서는 HashMap 사용. 시간 복잡도 : O(N) 공간 복잡도 : O(N) class Solutio..
1732. Find the Highest Altitude https://leetcode.com/problems/find-the-highest-altitude/ Find the Highest Altitude - 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 largestAltitude(self, gain: List[int]) -> int: # The biker starts his trip on point 0 a..
797. All Paths From Source to Target https://leetcode.com/problems/all-paths-from-source-to-target/ All Paths From Source to Target - 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 방법을 이용해서 재귀적으로 path를 탐색한다. class Solution: def allPathsSourceTarget(self, graph: List[..
1688. Count of Matches in Tournament https://leetcode.com/problems/count-of-matches-in-tournament/ Count of Matches in Tournament - 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) 문제안에 정답이 있다. 짝수 - n/2 matches, n/2 teams advance 홀수 - (n-1) / 2 matches, (n-1)/2 + 1 teams a..
1342. Number of Steps to Reduce a Number to Zero https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/ Number of Steps to Reduce a Number to Zero - 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) 모듈레이션 연산을 수행해서 나머지가 0이면 even, 아니면 odd even이면 나누기 2 연산, 아..
1877. Minimize Maximum Pair Sum in Array https://leetcode.com/problems/minimize-maximum-pair-sum-in-array/ Minimize Maximum Pair Sum in 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) 오름차순 정렬 후 최소, 최대 pair를 계속 구해나가서 max를 구한다. class Solution: def minPairSum(self, n..
1281. Subtract the Product and Sum of Digits of an Integer https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/ Subtract the Product and Sum of Digits of an Integer - 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) 숫자를 숫자 리스트 형태로 변환한다. 숫자 리스..