일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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풀기
- 릿코드 풀기
- 알고리즘풀이
- 파이썬 알고리즘
- 알고리즘풀기
- python 알고리즘
- 릿코드
- 파이썬릿코드풀기
- 파이썬알고리즘
- python Leetcode
- LeetCode
- leetcode 풀기
- python priority queue
- 잇츠디모
- python zip_longest
- 릿코드풀이
- binary search
- 릿코드풀기
- 파이썬 알고리즘 풀기
- 릿코드 파이썬
- 파이썬알고리즘풀기
- 파이썬릿코드
- python sorted
- leetcode풀이
- python 릿코드
- 코틀린기초
- python xor
- 파이썬 프로그래머스
- 파이썬 릿코드
- 상가수익률계산기
- Today
- Total
목록알고리즘/LeetCode (177)
소프트웨어에 대한 모든 것
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/ciIzf7/btrlbC7bCWZ/GqS0MmEbquMLEBOd38jB21/img.png)
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) -..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dg76Cj/btrk7u8bTtI/Nb5fo0qaKMAKvmI2KxUyD0/img.png)
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..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/IfsX1/btrk8lwnAD1/dDtArFmj4O8D4LTp2NOdvk/img.png)
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 시간이 너무 오래걸립니다. 하..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/wMSKR/btrkK7zw6op/hBx3KjWuJBMAYW08hyz8OK/img.png)
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) 스택 자료구조를 사용한다. 모든 노드를 순회하면서 스택에 ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/LYllx/btrk184Ch67/Ma0gqARhJwNHBz8kHtpzH1/img.png)
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가..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/oJujE/btrkJk6Dyrw/fka3oKnunWgAvKU0ucwqmk/img.png)
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..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/rYlRE/btrkBFoSDUS/byDrc8twrp0INuvoqkjKVk/img.png)
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
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/c6TNMF/btrkw5WP61a/gG2n97oro1d5I17SCldLr0/img.png)
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 --..