일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- queue
- route
- Callback
- React
- server
- BinaryTree
- map
- axios
- Navigation
- node.js
- array
- leetcode
- count
- c++
- css
- Context
- priority_queue
- component
- Props
- nodeJS
- bit
- MySQL
- routes
- 비트연산
- JSX
- DP
- state
- UE5
- event
- treenode
- Today
- Total
목록Leetcode (25)
우사미 코딩

1. 문제링크 https://leetcode.com/problems/course-schedule-ii/ Course Schedule II - LeetCode Can you solve this real interview question? Course Schedule II - There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, bi] indicates that you must take leetcode.com a과목의 선수과목이 b일 때 vector = {a, b};로 표시한다. ..
1. 문제링크 Rotting Oranges - LeetCode Can you solve this real interview question? Rotting Oranges - You are given an m x n grid where each cell can have one of three values: * 0 representing an empty cell, * 1 representing a fresh orange, or * 2 representing a rotten orange. Every minute, any leetcode.com 2. key point - queue를 사용하자 1) 상한 오렌지 q에 넣기 2) 오렌지는 자기 주변 4셀(상하좌우)만 썩게 할 수 있음 3) 상태가 1에서 2로 변경되..
1. 문제링크 https://leetcode.com/problems/task-scheduler/ Task Scheduler - LeetCode Can you solve this real interview question? Task Scheduler - Given a characters array tasks, representing the tasks a CPU needs to do, where each letter represents a different task. Tasks could be done in any order. Each task is done in one unit of time. F leetcode.com 2. key point - priority_queue를 사용하자! 1) 각 task의 ..
1. 문제링크 Search in Rotated Sorted Array - LeetCode Can you solve this real interview question? Search in Rotated Sorted Array - There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k (1 nums[m])와 target이 1인 경우(target < nums[l])인 경우가 되겠다. 위 조건에 해당되지 않는다면 R 포인터를 M-1로 이동해준다. 2) nums..

1. 문제링크 Path Sum III - LeetCode Can you solve this real interview question? Path Sum III - Given the root of a binary tree and an integer targetSum, return the number of paths where the sum of the values along the path equals targetSum. The path does not need to start or end at the roo leetcode.com 2. Key Point - targetSum은 어디에나 존재할 수 있다, 모든 노드를 탐색하자 이 꼭 시작과 끝이 root에서 leaf까지의 sum이 아니어도 된다. 현재까지의..

1. 문제링크 Diameter of Binary Tree - LeetCode Can you solve this real interview question? Diameter of Binary Tree - Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path leetcode.com - Diameter : 지름 binary tree에서 제일 긴 path의 길이를 구한다 이 path는 특정노드에 대해서 가장 왼쪽 edge node ->..

1. 문제링크 Balanced Binary Tree - LeetCode Can you solve this real interview question? Balanced Binary Tree - Given a binary tree, determine if it is height-balanced. Example 1: [https://assets.leetcode.com/uploads/2020/10/06/balance_1.jpg] Input: root = [3,9,20,null,null,15,7] Output: true Exam leetcode.com 2. height-Balanced가 뭐지? 여기서 파란색 볼드를 클릭하면 height-balanced에 대한 설명이 나온다 A height-balanced bina..

1. 문제링크 Verifying an Alien Dictionary - LeetCode Can you solve this real interview question? Verifying an Alien Dictionary - In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters. leetcode.com 2. 문제 파악하기 먼저 이 주옥같은 문제는 이해하는데 조금 시간이 걸렸다 나만 이해못했나 해서 discussion에 들어가서 봤는데 문제를 이..