leetcode 933.Number of Recent Calls 简单
leetcode 933.Number of Recent Calls 简单Number of Recent CallsWrite a class RecentCounter to count recent requests.It has only one method: ping(int t), where t represents some time in milliseconds.Re...
leetcode 933.Number of Recent Calls 简单Number of Recent CallsWrite a class RecentCounter to count recent requests.It has only one method: ping(int t), where t represents some time in milliseconds.Re...
41. First Missing Positive41. First Missing PositiveGiven an unsorted integer array, find the smallest missing positive integer.Example 1:Input: [1,2,0]Output: 3Example 2:Input: [3,4,-1,1]Output: 2...
leetcode 15.3sumGiven an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution se...
1. Two Sum题目链接:1. Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and...
种花问题 leetcode每日一题 2021/1/1605. 种花问题假设你有一个很长的花坛,一部分地块种植了花,另一部分却没有。可是,花卉不能种植在相邻的地块上,它们会争夺水源,两者都会死去。给定一个花坛(表示为一个数组包含0和1,其中0表示没种植花,1表示种植了花),和一个数 n 。能否在不打破种植规则的情况下种入 n 朵花?能则返回True,不能则返回False。示例 1:输入: fl...