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

733. Flood Fill https://leetcode.com/problems/flood-fill/ Flood Fill - 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 방법을 사용합니다. 상하좌우를 이동해가면서 old_color를 new_color로 변경해나갑니다. class Solution: def floodFill(self, image: List[List[int]], sr: int, sc: int, newColor: int) -..

567. Permutation in String https://leetcode.com/problems/permutation-in-string/ Permutation in String - 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) 스트링 매칭 문제입니다. 슬라이딩 윈도우 방식을 통해서 문제를 해결합니다. s1의 각 문자의 수를 세어서 윈도우 사이즈 만큼 s2에서 동일한 count 패턴이 나오는지 체크합니다. # Sliding Window cl..

3. Longest Substring Without Repeating Characters https://leetcode.com/problems/longest-substring-without-repeating-characters/ Longest Substring Without Repeating 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로 무식하게 풉니다. Runtime 시간이 너무 오래걸립니다. 하..

19. Remove Nth Node From End of List https://leetcode.com/problems/remove-nth-node-from-end-of-list/discuss/?currentPage=1&orderBy=most_votes&query= Remove Nth Node From End of List - LeetCode Discuss 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) 스택 자료구조를 사용한다. 모든 노드를 순회하면서 스택에 ..

876. Middle of the Linked List https://leetcode.com/problems/middle-of-the-linked-list/ Middle of the Linked 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) walker and runner 테크닉을 사용한다. runner는 2 steps로 이동, walker는 1 step로 노드를 이동한다. runner가 마지막 위치에 도달했다는 것은 walker가..

739. Daily Temperatures https://leetcode.com/problems/daily-temperatures/ Daily Temperatures - 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로 접근해서 문제를 풀었더니 "Time Limit Exceeded"가 발생합니다. 시간 복잡도 : O(M^2) 공간 복잡도 : O(1) class Solution: def dailyTemperatures(self..

1413. Minimum Value to Get Positive Step by Step Sum 문제) 솔루션1) class Solution: def minStartValue(self, nums: List[int]) -> int: if nums[0] > 0: start = 1 else: start = abs(nums[0]) + 1 while True: r = start for n in nums: if r+n int: return abs(min(accumulate(nums, initial=0))) + 1

167. Two Sum II - Input Array Is Sorted https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ Two Sum II - Input array is sorted - 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) 배열을 순차적으로 탐색하면서 target에서 특정 값을 뺐을 때 원하는 값이 있는지 hash를 체크해서 풀 수 있다. a + b = target --..