일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 priority queue
- leetcode풀기
- 릿코드풀이
- leetcode 풀기
- python 알고리즘
- 코틀린기초
- 파이썬릿코드풀기
- 파이썬 알고리즘 풀기
- 릿코드풀기
- 상가수익률계산기
- python xor
- leetcode풀이
- python Leetcode
- 파이썬알고리즘풀기
- 파이썬알고리즘
- 릿코드 풀기
- 릿코드 파이썬
- binary search
- python 릿코드
- python sorted
- LeetCode
- 릿코드
- 파이썬 릿코드
- 알고리즘풀기
- python zip_longest
- 알고리즘풀이
- 파이썬 프로그래머스
- 잇츠디모
- 파이썬 알고리즘
- 파이썬릿코드
- Today
- Total
목록파이썬알고리즘 (16)
소프트웨어에 대한 모든 것
1979. Find Greatest Common Divisor of Array https://leetcode.com/problems/find-greatest-common-divisor-of-array/ Find Greatest Common Divisor of 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) 최소, 최대 값을 구하고 최소값을 계속 감소시켜가면서 최소값, 최대값을 나눈 나머지가 0인 것을 찾는다. class Soluti..
709. To Lower Case https://leetcode.com/problems/to-lower-case/ To Lower Case - 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 toLowerCase(self, s: str) -> str: lower = list(s) for i, c in enumerate(lower): # 대문자인 경우, 소문자로 변경 if 'A'
1464. Maximum Product of Two Elements in an Array https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array/ Maximum Product of Two Elements 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(nlogn) class Solution: def maxProduct(self, nums: L..
1941. Check if All Characters Have Equal Number of Occurrences https://leetcode.com/problems/check-if-all-characters-have-equal-number-of-occurrences/ Check if All Characters Have Equal Number of Occurrences - 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) defaultdict() ..
1816. Truncate Sentence https://leetcode.com/problems/truncate-sentence/ Truncate Sentence - 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 truncateSentence(self, s: str, k: int) -> str: return ' '.join(s.split()[:k])
1913. Maximum Product Difference Between Two Pairs https://leetcode.com/problems/maximum-product-difference-between-two-pairs/ Maximum Product Difference Between Two Pairs - 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(nlogn) 공간 복잡도 : O(1) class Solution: de..
70. Climbing Stairs https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 climbStairs(self, n: int) -> int: ''' f(0) = 0 f(1) = 1 f(2) = 2 f(3) = f(2) + f(1) ... f(n) = f(n-1) + (n-2)..
1832. Check if the Sentence Is Pangram https://leetcode.com/problems/check-if-the-sentence-is-pangram/ 문제) 솔루션1) 각 알파벳을 해쉬에 저장 sentence에서 문자를 해쉬에서 key 값 서치해서 있으면 삭제 해쉬의 사이즈가 0이면 pangram을 만족하기 때문에 True를 리턴, 아니면 False class Solution: def checkIfPangram(self, sentence: str) -> bool: alphabets = 'abcdefghijklmnopqrstuvwxyz' d = {} for c in alphabets: d[c] = None for c in sentence: if c in d: del d[c..