CodingTest에 해당하는 글 63

  1. [LeetCode] Longest Common Subsequence 2025.07.01

    https://leetcode.com/problems/longest-common-subsequence/description/?envType=study-plan-v2&envId=leetcode-75Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0. A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative orde..


  2. [LeetCode] Daily Temperatures 2025.06.25

    https://leetcode.com/problems/daily-temperatures/description/?envType=study-plan-v2&envId=leetcode-75 Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.Example 1:..


  3. [LeetCode] Single Number 2025.06.17

    https://leetcode.com/problems/single-number/description/?envType=study-plan-v2&envId=leetcode-75 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 = [2,2,1]Output: 1 Example 2:Input: nums = [4,1,2,1,2]Output: 4 Example 3:..


  4. [LeetCode] Counting Bits 2025.06.16

    https://leetcode.com/problems/counting-bits/description/?envType=study-plan-v2&envId=leetcode-75 Given an integer n, return an array ans of length n + 1 such that for each i (0 ans[i] is the number of 1's in the binary representation of i. Example 1: Input: n = 2 Output: [0,1,1] Explanation: 0 --> 0 1 --> 1 2 --> 10 Example 2: Input: n = 5 Output: [0,1,1,2,1,2] Explanation: 0 --> 0 1 --> 1 2 -->..


  5. [LeetCode] Unique Paths 2025.06.09

    https://leetcode.com/problems/unique-paths/description/?envType=study-plan-v2&envId=leetcode-75 There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]).The robot tries to move to the bottom-right corner (i.e., grid[m - 1][n -1]).The robot can only move either down or right at any point in time. Given the two integers m and n, return the number ..


  6. [LeetCode] House Robber 2025.05.27

    https://leetcode.com/problems/house-robber/description/?envType=study-plan-v2&envId=leetcode-75You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses w..


  7. [LeetCode] N-th Tribonacci Number 2025.05.21

    https://leetcode.com/problems/n-th-tribonacci-number/description/?envType=study-plan-v2&envId=leetcode-75 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 Explanation: T_3 = 0 + 1 + 1 = 2 T_4 = 1 + 1 + 2 = 4Example 2:Input: n = 25 Output: 1389537 Constraints:0 The ans..


  8. [LeetCode] Fibonacci Number 2025.05.19

    https://leetcode.com/problems/fibonacci-number/The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0, F(1) = 1 F(n) = F(n - 1) + F(n - 2), for n > 1. Given n, calculate F(n).Example 1: Input: n = 2 Output: 1 Explanation: F(2) = F(1) + F(0) = 1 + 0 = 1. Examp..


  9. [LeetCode] Path Sum III 2025.05.19

    보호되어 있는 글입니다.


  10. [LeetCode] Count Good Nodes in Binary Tree 2025.05.15

    https://leetcode.com/problems/count-good-nodes-in-binary-tree/description/?envType=study-plan-v2&envId=leetcode-75Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X.Return the number of good nodes in the binary tree. Example 1:Input: root = [3,1,4,3,null,1,5]Output: 4Explanation: Nodes in blue are good.Root No..