加载中...
分类详情
中等 分类
377-组合总和 Ⅳ(Combination Sum IV)
原文链接: https://leetcode-cn.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 answer is guaranteed to fit in a 32-bit integer.…
2021-12-03
384-打乱数组(Shuffle an Array)
原文链接: https://leetcode-cn.com/problems/shuffle-an-array 英文原文Given an integer array nums, design an algorithm to randomly shuffle the array. All permutations of the array should be equally likely as a result of the shuffling. Implement the Solution cl…
2021-12-03
393-UTF-8 编码验证(UTF-8 Validation)
原文链接: https://leetcode-cn.com/problems/utf-8-validation 英文原文Given an integer array data representing the data, return whether it is a valid UTF-8 encoding. A character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules: For a 1-b…
2021-12-03
394-字符串解码(Decode String)
原文链接: https://leetcode-cn.com/problems/decode-string 英文原文Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k i…
2021-12-03
396-旋转函数(Rotate Function)
原文链接: https://leetcode-cn.com/problems/rotate-function 英文原文You are given an integer array nums of length n. Assume arrk to be an array obtained by rotating nums by k positions clock-wise. We define the rotation function F on nums as follow: F(k) = 0 …
2021-12-03
400-第 N 位数字(Nth Digit)
原文链接: https://leetcode-cn.com/problems/nth-digit 英文原文Given an integer n, return the nth digit of the infinite integer sequence [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]. Example 1: Input: n = 3 Output: 3 Example 2: Input: n = 11 Output: 0 Explanation:…
2021-12-03
390-消除游戏(Elimination Game)
原文链接: https://leetcode-cn.com/problems/elimination-game 英文原文You have a list arr of all integers in the range [1, n] sorted in a strictly increasing order. Apply the following algorithm on arr: Starting from left to right, remove the first number and …
2021-12-03