Leetcode 279

[DP-Multidimensional][Medium] 62. Unique Paths

https://leetcode.com/problems/unique-paths/description LeetCode - The World's Leading Online Programming Learning Platform 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 Q. 아래와 같이 주어진 m x n grid 에서 로봇이 좌상단에 있다. 우하단으로 도달하기 위한 모든 경로의 수를 찾아라. 이때 로봇은 우로 혹은 아래로 1칸만 이동 가능하다. Solution. 특정 위치로 도달하..

Leetcode/LeetCode75 2024.01.21

[DP-1D][Medium] 790. Domino and Tromino Tiling

https://leetcode.com/problems/domino-and-tromino-tiling LeetCode - The World's Leading Online Programming Learning Platform 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 Q. 아래와 같은 두 종류의 shape이 존재할때, 2xn의 보드를 채운다면 몇가지 방법으로 가능할지 계산하라. 이때 결과가 너무 클 수 있으니, modulo는 10000000007 을 사용하라. n=3 일 경우 ..

Leetcode/LeetCode75 2024.01.19

[DP-1D][Medium] 198. House Robber

https://leetcode.com/problems/house-robber/description LeetCode - The World's Leading Online Programming Learning Platform 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 Q. 주어진 vector nums는 각 집에 있는 돈을 의미한다. 강도가 집을 방문할때 rob 할수 있는 최대 돈의 양을 찾아라. 이때 인접한 두 집은 rob 불가능하다. Solution. 이전 문제와 거의 동일한 ..

Leetcode/LeetCode75 2024.01.16

[DP-1D][Easy] 746. Min Cost Climbing Stairs

https://leetcode.com/problems/min-cost-climbing-stairs/description LeetCode - The World's Leading Online Programming Learning Platform 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 Q. 계단아래서부터 주어진 계단을 하나 혹은 두개씩 점프해서 올라갈 수 있다. 각 계단을 밟을시 비용이 cost vector가 주어질때, top 에 도달하기 위한 최소 비용을 구하라. Solut..

Leetcode/LeetCode75 2024.01.16

[DP-1D][Easy] 1137.N-th Tribonacci Number

https://leetcode.com/problems/n-th-tribonacci-number/description N-th Tribonacci Number - LeetCode Can you solve this real interview question? N-th Tribonacci Number - The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. Given n, return the value of Tn. Example 1: Input: n = 4 Output: 4 E leetcode.com Q. Tribonacci를 주어진 n에 대해 다음과 같이 정의..

Leetcode/LeetCode75 2024.01.15

[Backtracking][Medium] 216. Combination Sum III

https://leetcode.com/problems/combination-sum-iii/description Combination Sum III - LeetCode Can you solve this real interview question? Combination Sum III - Find all valid combinations of k numbers that sum up to n such that the following conditions are true: * Only numbers 1 through 9 are used. * Each number is used at most once. Return a list leetcode.com Q. 1 ~ 9개의 숫자를 k 번 사용하여 그 합을 n 을 만든다..

Leetcode/LeetCode75 2024.01.13

[Binary Search][Medium] 875. Koko Eating Bananas

https://leetcode.com/problems/koko-eating-bananas/description Koko Eating Bananas - LeetCode Can you solve this real interview question? Koko Eating Bananas - Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours. Koko can decide her bananas-per-hour eating sp leetcode.com Q. 주어진 vector piles는 각 바나나 개수를 의미한다..

Leetcode/LeetCode75 2024.01.12

[Binary Search][Medium] 162. Find Peak Element

https://leetcode.com/problems/find-peak-element/description Find Peak Element - LeetCode Can you solve this real interview question? Find Peak Element - A peak element is an element that is strictly greater than its neighbors. Given a 0-indexed integer array nums, find a peak element, and return its index. If the array contains multiple peaks, leetcode.com Q. nums 배열이 주어질 때, 특정 원소가 인접한 두개의 원소보다 ..

Leetcode/LeetCode75 2024.01.11

[Binary Search][Medium] 2300. Successful Pairs of Spells and Potions

https://leetcode.com/problems/successful-pairs-of-spells-and-potions/description Successful Pairs of Spells and Potions - LeetCode Can you solve this real interview question? Successful Pairs of Spells and Potions - You are given two positive integer arrays spells and potions, of length n and m respectively, where spells[i] represents the strength of the ith spell and potions[j] repre leetcode.c..

Leetcode/LeetCode75 2024.01.10