- Today
- Total
목록스터디 (246)
작심삼일
문제 링크: https://leetcode.com/problems/interleaving-string/ 문제 Given strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2. An interleaving of two strings s and t is a configuration where they are divided into non-empty substrings such that: s = s1 + s2 + ... + sn t = t1 + t2 + ... + tm |n - m|
문제 링크: 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). 조건 0 int: fi = [0]*31 fi[1] = 1 for idx in range(2, n+1): fi[idx] = fi[i..
문제 링크: https://leetcode.com/problems/candy/ 문제 There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. You are giving candies to these children subjected to the following requirements: Each child must have at least one candy. Children with a higher rating get more candies than their neighbors. Return the minimum number of candies you nee..
문제 링크: https://leetcode.com/problems/maximum-units-on-a-truck/ 문제 You are assigned to put some amount of boxes onto one truck. You are given a 2D array boxTypes, where boxTypes[i] = [$numberOfBoxes_i$, $numberOfUnitsPerBox_i$]: $numberOfBoxes_i$ is the number of boxes of type i. $numberOfUnitsPerBox_i$ is the number of units in each box of the type i. You are also given an integer truckSize, whi..
문제 링크: https://leetcode.com/problems/queue-reconstruction-by-height/ 문제 You are given an array of people, people, which are the attributes of some people in a queue (not necessarily in order). Each people[i] = [$h_i$, $k_i$] represents the ith person of height hi with exactly $k_i$ other people in front who have a height greater than or equal to $h_i$. Reconstruct and return the queue that is re..
문제 링크: https://leetcode.com/problems/minimum-deletions-to-make-character-frequencies-unique/ 문제 A string s is called good if there are no two different characters in s that have the same frequency. Given a string s, return the minimum number of characters you need to delete to make s good. The frequency of a character in a string is the number of times it appears in the string. For example, in t..
문제 링크: https://leetcode.com/problems/partitioning-into-minimum-number-of-deci-binary-numbers/ 문제 A decimal number is called deci-binary if each of its digits is either 0 or 1 without any leading zeros. For example, 101 and 1100 are deci-binary, while 112 and 3001 are not. Given a string n that represents a positive decimal integer, return the minimum number of positive deci-binary numbers needed..
문제 링크: https://leetcode.com/problems/course-schedule-iii/ 문제 There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [$duration_i$, $lastDay_i$] indicate that the ith course should be taken continuously for durationi days and must be finished before or on $lastDay_i$. You will start on the 1st day and you cannot take two or more courses simult..