일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- leetcode 풀기
- python 알고리즘
- python sorted
- 파이썬알고리즘풀기
- 파이썬릿코드
- 릿코드풀이
- 릿코드 파이썬
- 파이썬 알고리즘 풀기
- 알고리즘풀기
- LeetCode
- python zip_longest
- 파이썬알고리즘
- leetcode풀이
- python priority queue
- 릿코드
- python xor
- 릿코드 풀기
- 파이썬 릿코드
- 알고리즘풀이
- binary search
- leetcode풀기
- 코틀린기초
- 파이썬 프로그래머스
- 상가수익률계산기
- python 릿코드
- python Leetcode
- 릿코드풀기
- 파이썬릿코드풀기
- 잇츠디모
- 파이썬 알고리즘
- Today
- Total
목록python 알고리즘 (17)
소프트웨어에 대한 모든 것
476. Number Complement https://leetcode.com/problems/number-complement/ Number Complement - 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 findComplement(self, num: int) -> int: res = [] for c in bin(num)[2:]: if c == '1': res.append('0') else: res.ap..
143. Reorder List https://leetcode.com/problems/reorder-list/ Reorder List - 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) two deques 두 개의 deque() 자료구조를 사용합니다. 풀이 전략: deque() 자료구조 q1, q2를 준비 리스트 전체를 순회해서 모든 값을 q1에 넣음 q1 아이템에서 뒤의 절반에 해당되는 부분을 pop()해서 q2에 추가 q1, q2 아이템을 번..
1200. Minimum Absolute Difference https://leetcode.com/problems/minimum-absolute-difference/ Minimum Absolute Difference - 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) Easy one path class Solution(object): def minimumAbsDifference(self, arr): """ :type arr: List[int] :..
1325. Delete Leaves With a Given Value https://leetcode.com/problems/delete-leaves-with-a-given-value/ Delete Leaves With a Given Value - 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) Simple 재귀 이진 트리의 순회, 후위 순회에 대해서 이해하고 있다면 쉽게 풀 수 있는 문제입니다. # Definition for a binary tr..
1742. Maximum Number of Balls in a Box https://leetcode.com/problems/maximum-number-of-balls-in-a-box/ Maximum Number of Balls in a Box - 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 countBalls(self, lowLimit: int, highLimit: int) -> int: d = def..
1304. Find N Unique Integers Sum up to Zero https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/ Find N Unique Integers Sum up 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) Straight forward n 숫자가 주어지면 유니크한 숫자 n개를 더했을 때 0를 만드는 array를 구하는 문제입니다. ..
1002. Find Common Characters https://leetcode.com/problems/find-common-characters/ Find Common 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) - brute force 하나의 타겟 단어를 정하고 모든 단어를 비교해 가면서 중복되지 않는 단어를 제거해서 최종적으로 남은 char를 리턴합니다. # brute-force class Solution: def..
155. Min Stack https://leetcode.com/problems/min-stack/ Min Stack - 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) 두 개의 스택 활용(Normal Stack, Min Stack) Normal Stack에 요소가 추가될 때 Min Stack에는 현재의 min 요소를 추가 getMin() 호출 시 Min Stack에서 가장 상단의 요소를 리턴하면 됨. class MinStack: def __in..