일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- react-query
- 카드뉴스
- TypeScript
- 알고리즘
- html&css
- programmers
- 웹접근성
- leetcode
- 디자인
- 정규표현식
- 제로베이스 프론트엔드 스쿨
- wai-aria
- 프로그래머스
- 비트연산자
- JavaScript
- react
- Today
- Total
목록leetcode (14)
記錄

문제 링크: https://leetcode.com/problems/rotate-image/description/ 난이도: Medium 문제 설명 You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation. 주어진 n x n 2D 매트릭스 이미지를 90도(시계 방향) 회전합니다. 이미지를 제자리에서 회전해야 합니다. ..

문제 링크: https://leetcode.com/problems/longest-substring-without-repeating-characters/ 난이도: Medium Given a string s, find the length of the longest substring without repeating characters. 주어진 문자열 s에서 반복되는 문자가 없는 가장 긴 문자열의 길이를 구하시오. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: s = "bbbbb" Output: 1 Explanation: The answer is "b..

문제 링크: https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/ 난이도: Medium Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 두 개의 문자열 needle과 haystack이 주어지면, haystack에서 needle이 처음 나타나는 index를 반환하거나, needle이 haystack의 일부가 아닌 경우 -1을 반환합니다. Example 1: Input: haystack = "sadbutsad"..

문제 링크: https://leetcode.com/problems/valid-parentheses/ 난이도: Easy Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Every close bracket has a corresponding open bracket of the same type. '..

문제 링크: https://leetcode.com/problems/triangle/ 난이도: Medium Given a triangle array, return the minimum path sum from top to bottom. For each step, you may move to an adjacent number of the row below. More formally, if you are on index i on the current row, you may move to either index i or index i + 1 on the next row. 삼각형 배열이 주어지면 위에서 아래로 최소 경로 합계를 반환합니다. 각 단계에 대해 아래 행의 인접한 번호로 이동할 수 있습니다. 보다 공식적..

문제 링크: https://leetcode.com/problems/lexicographical-numbers/ 난이도: Medium Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order. You must write an algorithm that runs in O(n) time and uses O(1) extra space. 정수 n이 주어지면 사전순으로 정렬된 [1, n] 범위의 모든 숫자를 반환합니다. O(n) 시간 내에 실행되며 O(1) 여유 공간을 사용하는 알고리즘을 작성해야 합니다. Example 1: Input: n = 13 Output: [1,10,11,12,13,2,3,4,5..

문제 링크: https://leetcode.com/problems/sort-the-people/ 난이도: Easy You are given an array of strings names, and an array heights that consists of distinct positive integers. Both arrays are of length n. For each index i, names[i] and heights[i] denote the name and height of the ith person. Return names sorted in descending order by the people's heights. Example 1: Input: names = ["Mary","John","Emm..

문제 링크: https://leetcode.com/problems/rotate-array/ 난이도: Medium Given an array, rotate the array to the right by k steps, where k is non-negative. 주어진 배열을 음수가 아닌 정수 k만큼 우측으로 회전시켜라. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate 1 steps to the right: [7,1,2,3,4,5,6] rotate 2 steps to the right: [6,7,1,2,3,4,5] rotate 3 steps to the right: [5,6,7,1,2,3,4..