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

문제 링크: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/ 난이도: Medium Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. You must write an algorithm with O(log n) runtime complexity. 오름차순으로 정렬된 정수 수의 배열이 주어지면, 주어진 목표 값의 시작 위치와 끝 위치를..

문제 링크: https://leetcode.com/problems/single-number/ 난이도: Easy Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant extra space. 비어 있지 않은 정수 배열이 주어지면 모든 요소는 하나를 제외하고 두 번 나타납니다. 그 하나를 찾으십시오. 선형 런타임 복잡성이 있는 솔루션을 구현하고 일정한 추가 공간만 사용해야 합니다. Example 1: Input: nums ..

문제 링크: https://leetcode.com/problems/kth-largest-element-in-an-array/ 난이도: Medium Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted order, not the kth distinct element. You must solve it in O(n) time complexity. 정수 배열 nums와 정수 k가 주어지면 배열에서 k번째로 큰 요소를 반환합니다. k번째 고유 요소가 아니라 정렬된 순서에서 k번째로 가장 큰 요소라는 점에 유의하..

문제 링크: https://leetcode.com/problems/reverse-integer/ 난이도: Medium Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2³¹, 2³¹ - 1], then return 0. Assume the environment does not allow you to store 64-bit integers (signed or unsigned). 32비트 정수 x가 주어지면 숫자를 반대로 하여 x를 반환합니다. 만약 반전된 x의 값이 32비트 정수 범위 [-2³..

문제 링크: https://leetcode.com/problems/powx-n/ 난이도: Medium Implement pow(x, n), which calculates x raised to the power n (i.e., xⁿ). pow(x, n)를 구현합니다. pow(x, n)는 power n(즉, xⁿ)으로 상승된 x를 계산합니다. Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input: x = 2.10000, n = 3 Output: 9.26100 Example 3: Input: x = 2.00000, n = -2 Output: 0.25000 Explanation: 2-2 = 1/22 = 1/4 = 0.25 Constr..

문제 링크: https://leetcode.com/problems/two-sum/ 난이도: Easy Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. 정수 숫자의 배열과 정수 목표값이 주어지면 목표값에 더해지도록 두 숫자의 index를 반환합니다. 각 입력에 정확히 하나의 솔루션..