일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 동적계획법
- 리트코드
- Level3
- python
- C++
- CS
- react
- 고득점Kit
- LeetCode
- OS
- 리액트
- typescript
- 자바스크립트
- web
- 코테연습
- dp
- 카카오
- javascript
- Medium
- Level1
- Level2
- VUE
- Doitvue.js입문
- 배열
- 프로그래머스
- sql
- 웹프로그래밍
- 파이썬
- 백준
- 프로그래밍
- Today
- Total
목록리트코드 (22)
581. Shortest Unsorted Continuous Subarray 문제 Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. 제한사항 1
162. Find Peak Element 문제 A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks. You may imagine that nums[-1] = nums[n] = -∞. You must write an algorithm that runs in O(log n) time. 제한사항 1
88. Merge Sorted Array 문제 You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be returned by the function, but instead be stored inside the array nums1. To accommoda..
75. Sort Colors 문제 Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. We will use the integers 0, 1, and 2 to represent the color red, white, and blue, respectively. You must solve this problem without using the library's sort function. sort() 라이브러리를 사용하지 않고 in-place..
680. Valid Palindrome II 문제 Given a string s, return true if the s can be palindrome after deleting at most one character from it. 최대 하나의 문자를 제거해서 팰린드롭이 될 수 있는지 확인하는 문제 제한사항 1 bool: return self.makePalindrome(s, 0, len(s) - 1, 0) 최대 한 번이기 때문에 백트래킹을 사용하지 않고 더 간단하게 정리할 수도 있다. 일치하지 않은 케이스와 start를 제거한 부분과 end를 제거한 케이스로 슬라이싱 한 후 둘 중에 하나라도 팰린드롭인지 확인하면된다. class Solution: def validPalindrome(self, s: st..
125. Valid Palindrome 문제 A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers. Given a string s, return true if it is a palindrome, or false otherwise. 제한사항 1 bool: beg, end = 0, len(s) - 1 while beg
49. Group Anagrams 문제 Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. 제한사항 1
3. Longest Substring Without Repeating Characters 문제 Given a string s, find the length of the longest substring without repeating characters. 제한사항 0 int: max_length, start = 0, 0 checked = {} for end in range(len(s)): if s[end] not in checked: # 처음 나온 문자일 때 max_length = max(max_length, end - start + 1) else: # 반복된 문자일 때 if checked[s[end]] < start: # 반복된 문자열이 현재 window에 포함되지 않을 경우 max_length = ma..