[Leetcode] 연결리스트
For n = 1, 2, 3, 4, and 5, the middle nodes are 0, 1, 1, 2, and 2, respectively. Input: head = [1,3,4,7,1,2,6] Output: [1,3,4,1,2,6] Explanation: The above figure represents the given linked list...
For n = 1, 2, 3, 4, and 5, the middle nodes are 0, 1, 1, 2, and 2, respectively. Input: head = [1,3,4,7,1,2,6] Output: [1,3,4,1,2,6] Explanation: The above figure represents the given linked list...
206. Reverse Linked List Easy Topics [ ](#) Companies Given the head of a singly linked list, reverse the list, and return the reversed list. Example 1: Input: head = [1,2,3,4,5] Output: [5,4,3,...
RecentCounter() Initializes the counter with zero recent requests. int ping(int t) Adds a new request at time t, where t represents some time in milliseconds, and returns the number of requests t...
2352. Equal Row and Column Pairs Solved Medium Topics [ ](#) Companies Hint Given a 0-indexed n x n integer matrix grid, return the number of pairs *(ri, cj) such that row ri and column cj are equ...
현재 구조 (Traditional Layered) QuirkaApi/ ├── Controllers/ (5개) - 컨트롤러가 섞여있음 ├── Services/ (15개) - 서비스가 섞여있음 ├── Models/ (13개) - 엔티티가 섞여있음 ├── DTOs/ (3개) ├── Data/ └── ...
1 5 nums[i] is either 0 or 1. backstore: 이전 연속된 1의 개수 저장 count: 현재 연속된 1의 개수 0을 만나면 현재까지의 1 개수를 backstore에 저장하고 count를 리셋 backstore + count 는 하나의 0을 삭제했을 때 얻을 수 있는 최대 연속 1의 길이 class Sol...
슬라이딩 윈도우의 장점을 살리지 못한 코드: 중첩 for문(k는 작은 상수 값) O(n*k) class Solution: def maxVowels(self, s: str, k: int) -> int: vowels = set('aeiou') max_count ...
1 5 nums[i] is either 0 or 1. 0 0의 리스트 만들기 예외처리 조기 리턴하기 첫 번째 슬라이딩 윈도우 계산 나머지 슬라이딩 윈도우 계산 class Solution: def longestOnes(self, nums: List[int], k: int) -> int: zeros &a...
1 5 -231 31 - 1 class Solution: def increasingTriplet(self, nums: List[int]) -> bool: if len(nums) < 3: return False # 3개가 증가패턴이면 true, 아니면 false f...

설치 후, ctrl + ` 를 누르면 이전에 카피했던 목록들이 나온다. 다시 클릭해서 쓸 수 있다. 검색도 가능하다. https://sabrogden.github.io/Ditto/ Ditto - Clipboard Manager Ditto Clipboard Manager...