일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- python zip_longest
- 파이썬 프로그래머스
- 파이썬 릿코드
- 상가수익률계산기
- python 릿코드
- python Leetcode
- leetcode 풀기
- python xor
- 알고리즘풀기
- 릿코드 파이썬
- 릿코드풀기
- 코틀린기초
- 파이썬릿코드
- 릿코드
- leetcode풀기
- 파이썬 알고리즘 풀기
- python 알고리즘
- 파이썬알고리즘풀기
- 파이썬알고리즘
- 파이썬 알고리즘
- python sorted
- leetcode풀이
- binary search
- python priority queue
- 알고리즘풀이
- 릿코드풀이
- LeetCode
- 잇츠디모
- 파이썬릿코드풀기
- 릿코드 풀기
- Today
- Total
목록알고리즘/LeetCode (177)
소프트웨어에 대한 모든 것
1720. Decode XORed Array https://leetcode.com/problems/decode-xored-array/ Decode XORed 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) XOR은 교환법칙 결합법칙이 성립한다. 1 ^ x = 1, 좌변의 1을 제거하기 위해서 양변에 1^을 취한다 1 ^ 1 ^ x = 1 ^ 1, 0 ^ x = 0, x = 0 위 과정을 반복한다. class Solution: def..
1221. Split a String in Balanced Strings https://leetcode.com/problems/split-a-string-in-balanced-strings/ Split a String in Balanced Strings - 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) 순차적으로 'L' 문자수를 카운팅, 'R' 문자수를 카운팅해서 같아지는 시점에 balanced string 하나를 카운팅하고 'L', 'R' 문..
1302. Deepest Leaves Sum https://leetcode.com/problems/deepest-leaves-sum/ Deepest Leaves Sum - 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) hashtable을 사용해서 각 depth의 노드에 해당하는 모든 val 값들을 list 형태로 저장한다. hashtable에서 최대 depth에 O(1)로 접근해서 모든 values의 sum을 구하면 그것이 deepest lea..
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() ..
1844. Replace All Digits with Characters https://leetcode.com/problems/replace-all-digits-with-characters/ Replace All Digits with Characters - 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) ord(), chr()에 대한 이해가 필요 ord() : character을 ascii value로 변환 chr() : integer를 char..