일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 부트캠프
- 자바스크립트 split()
- 프론트개발
- 개발일기
- 날씨 웹 만들기
- 삼항연산자
- 자바스크립트 날씨
- 프론트개발공부
- 엘리스 AI 트랙 5기
- 리트코드
- 엘리스 ai 트랙
- HTML
- 자바스크립트 reduce()
- 개발공부
- 자바스크립트 날씨 웹 만들기
- [파이썬 실습] 기초 문제
- JavaScript
- 자바스크립트
- reactnativecli
- 간단한 날씨 웹 만들기
- 엘리스
- [AI 5기] 연습 문제집
- RN 프로젝트
- 프로그래머스
- [파이썬 실습] 중급 문제
- 자바스크립트 sort()
- [파이썬 실습] 심화 문제
- leetcode
- 코드스테이츠
- 코딩부트캠프
- Today
- Total
목록알고리즘🅰/리트코드 (38)
개발조각

문제 https://leetcode.com/problems/unique-paths/ Unique Paths - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 해결 방안 동적 프로그래밍 문제이며 공식과 같은 문제라고 생각합니다. 우선 만약 아래와 같은 상황이 있다고 생각합시다. 이 이미지와 같이 grid[1][100]이라도 finish에 도착할 수 있는 경우의 수는 1번이고 grid[100][1]이라도 finish에 도착할 수 있는 경우의 수는 1번입니다. 이 정..

문제 https://leetcode.com/problems/spiral-matrix-ii/ Spiral Matrix II - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 분석 및 설명 가로(row 방향), 세로(column방향)로 세트로 묶으면((가로, 세로), (가로, 세로)...) 총 3번이 나오고 마지막에 가로(row 방향)만 남는다. → 가로방향일때 반복문 종료문을 넣어주면 된다. row 방향일때는 y값이 변화되고 column 방향일 때는 x값이 ..

문제 https://leetcode.com/problems/length-of-last-word/submissions/ Length of Last Word - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 단어와 공백으로 구성된 문자열이 주어지면 문자열의 마지막 단어 길이를 반환해주는 문제입니다. 풀이 Example 2: Input: s = " fly me to the moon " Output: 4 Explanation: The last word is "moon"..

문제 https://leetcode.com/problems/insert-interval/ Insert Interval - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 아마 이 이미지 보시면 이해하실 수 있을 겁니다. 소스코드 var insert = function(intervals, newInterval) { intervals = [...intervals, newInterval].sort((a,b)=> a[0]-b[0]); if(intervals.length ..

문제 https://leetcode.com/problems/merge-intervals/ Merge Intervals - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 및 풀이과정 Example 1: Input: intervals = [[1,3],[2,6],[8,10],[15,18]] 이러한 예제가 있지만 여기서는 아래와 같이 3개의 원소가 있을 경우로 설명하겠습니다. [[1,3],[2,6],[8,10]] 1 2 3 4 5 6 7 8 9 10 [1,3..

문제 https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 이번 문제는 정사각형이 아닌 직사각형일 경우에도 적용이 가능해야 돼서 그 부분을 고려하고 코드를 짜야됩니다. 소스코드 var spiralOrder = function(matrix) { let [column, row] = [matrix.length, matrix[0].length]; let count = ..

문제 https://leetcode.com/problems/group-anagrams/ Group Anagrams - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 Example 1: Input: strs = ["eat","tea","tan","ate","nat","bat"] Output: [["bat"],["nat","tan"],["ate","eat","tea"]] 이 예제의 Output을 보시면 각 배열마다 공통점이 있습니다. (여기에서 ['bat..

문제 https://leetcode.com/problems/powx-n/ Pow(x, n) - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 소스코드 var myPow = function(x, n) { return x ** n; };