- Today
- Total
목록스터디 (250)
작심삼일
문제 링크: https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ 문제 Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree. A height-balanced binary tree is a binary tree in which the depth of the two subtrees of every node never differs by more than one. 조건 1
문제 링크: https://leetcode.com/problems/binary-trees-with-factors/ 문제 Given an array of unique integers, arr, where each integer arr[i] is strictly greater than 1. We make a binary tree using these integers, and each number may be used for any number of times. Each non-leaf node's value should be equal to the product of the values of its children. Return the number of binary trees we can make. The ..
문제 링크: https://leetcode.com/problems/longest-increasing-subsequence/ 문제 Given an integer array nums, return the length of the longest strictly increasing subsequence. A subsequence is a sequence that can be derived from an array by deleting some or no elements without changing the order of the remaining elements. For example, [3,6,2,7] is a subsequence of the array [0,3,1,6,2,2,7]. 조건 1

문제 링크: https://leetcode.com/problems/combination-sum-iv/ 문제 Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target. The test cases are generated so that the answer can fit in a 32-bit integer. 조건 1

문제 링크: https://leetcode.com/problems/mirror-reflection/ 문제 There is a special square room with mirrors on each of the four walls. Except for the southwest corner, there are receptors on each of the remaining corners, numbered 0, 1, and 2. The square room has walls of length p and a laser ray from the southwest corner first meets the east wall at a distance q from the 0th receptor. Given the two ..
문제 링크: https://leetcode.com/problems/my-calendar-i/ 문제 You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a double booking. A double booking happens when two events have some non-empty intersection (i.e., some moment is common to both events.). The event can be represented as a pair of integers start and end that represents a booking..
문제 링크: https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/ 문제 Given an n x n matrix where each of the rows and columns is sorted in ascending order, return the $k^{th}$ smallest element in the matrix. Note that it is the $k^{th}$ smallest element in the sorted order, not the $k^{th}$ distinct element. You must find a solution with a memory complexity better than O($n^2$). 조건 n..

문제 링크: https://leetcode.com/problems/unique-paths/ 문제 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 of possible unique paths that the robot..