일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- C++
- typescript
- Level2
- 동적계획법
- 백준
- VUE
- web
- sql
- 고득점Kit
- CS
- 파이썬
- Doitvue.js입문
- dp
- 리액트
- Level1
- 카카오
- Level3
- 자바스크립트
- 리트코드
- 프로그래밍
- LeetCode
- OS
- 배열
- react
- python
- 코테연습
- javascript
- Medium
- 웹프로그래밍
- 프로그래머스
- Today
- Total
목록배열 (11)
48. Rotate Image 문제 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 == matrix.length == matrix[i].length 1
18. 4Sum 문제 Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0
16. 3Sum Closest 문제 Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution taget에 가장 가까운 세 수의 합 찾기 제한사항 3
15. 3Sum 문제 Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets. 제한사항 0 List[List[int]]: nums.sort() answer = [] for i in range(len(nums) - 2): if i > 0 and nums[i] == nums[i - 1]: # 이미 체크한 값이면 패스 continue l, r = i + 1, len(nums..
1. Two Sum 문제 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. 제한사항 1
287. Find the Duplicate Number 문제 Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. There is only one repeated number in nums, return this repeated number. You must solve the problem without modifying the array nums and uses only constant extra space. [1, n] 까지의 숫자가 들어 있는 배열에 추가로 하나의 숫자가 들어 갔을 때 추가된 숫자 찾기 제한사항 1 int: n = len(nums) - 1 ..
581. Shortest Unsorted Continuous Subarray 문제 Given an integer array nums, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order. Return the shortest such subarray and output its length. 어떤 부분 배열만 정렬하면 전체가 정렬되는 부분 배열 찾기 제한사항 1 end: return 0 tmp = nums[start:end + 1] tmpMin = min(tmp) tmpMax = max(tm..
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