会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
habibah_chang
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
21
22
23
24
25
26
27
28
29
···
44
下一页
2020年7月18日
1232. Check If It Is a Straight Line
摘要: 问题: 给定一组坐标点,问这些坐标点是否在一条直线上。 Example 1: Input: coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]] Output: true Example 2: Input: coordinates = [[1,1],
阅读全文
posted @ 2020-07-18 11:27 habibah_chang
阅读(141)
评论(0)
推荐(0)
2020年7月12日
1386. Cinema Seat Allocation
摘要: 问题: 给定一个有n排,每排10个位置的影院,已被预订座位列表。 求一个4人组要定在连续相邻座位的可能性有多少种。 其中对过道(3和4之间,7和8之间),将其中一个人分开的话,不算满足相邻条件。 Example 1: Input: n = 3, reservedSeats = [[1,2],[1,3
阅读全文
posted @ 2020-07-12 13:04 habibah_chang
阅读(158)
评论(0)
推荐(0)
1333. Filter Restaurants by Vegan-Friendly, Price and Distance
摘要: 问题: 给出一组餐厅各种参数的,餐厅排行榜, 根据用户提供的3个要求:Vegan-Friendly, Price ,Distance 过滤满足要求的餐厅,并按照餐厅排行榜排序,若排名ranking一样,则按照id排序(都是大的排在前面)。 Example 1: Input: restaurants
阅读全文
posted @ 2020-07-12 11:10 habibah_chang
阅读(159)
评论(0)
推荐(0)
1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
摘要: 问题: 给定一个数组,求其中连续K个元素组成的子数组中,平均值>=Threshold的子数组个数。 Example 1: Input: arr = [2,2,2,2,5,5,5,8], k = 3, threshold = 4 Output: 3 Explanation: Sub-arrays [2
阅读全文
posted @ 2020-07-12 10:25 habibah_chang
阅读(147)
评论(0)
推荐(0)
2020年7月11日
1366. Rank Teams by Votes
摘要: 问题: 给出多次,字母排名次的名次列表。 求的综合名次的结果。(如果两字母分值相同,则按照字母序排列) Example 1: Input: votes = ["ABC","ACB","ABC","ACB","ACB"] Output: "ACB" Explanation: Team A was ra
阅读全文
posted @ 2020-07-11 16:37 habibah_chang
阅读(267)
评论(0)
推荐(0)
1352. Product of the Last K Numbers
摘要: 问题: 求两个接口,使得, add接口,向列表中添加元素, getProduct(k)接口,可得最后添加的k个元素的乘积。 Example: Input ["ProductOfNumbers","add","add","add","add","add","getProduct","getProduc
阅读全文
posted @ 2020-07-11 14:49 habibah_chang
阅读(157)
评论(0)
推荐(0)
1217. Play with Chips
摘要: 问题: 给定一个数组,表示了每一个chip的所在位置。 有以下的移动规则: 1.每向左or向右移动2个单位,消耗为0 2.没向左or向右移动1个单位,消耗为1 求将所有chip都移动到同一个位置,消耗最小是多少? Example 1: Input: chips = [1,2,3] Output: 1
阅读全文
posted @ 2020-07-11 12:05 habibah_chang
阅读(189)
评论(0)
推荐(0)
2020年7月6日
1200. Minimum Absolute Difference
摘要: 问题: 给定数组,求其中两两元素对之差=数组中两元素之差的最小值的,元素对数组。 Example 1: Input: arr = [4,2,1,3] Output: [[1,2],[2,3],[3,4]] Explanation: The minimum absolute difference is
阅读全文
posted @ 2020-07-06 16:19 habibah_chang
阅读(157)
评论(0)
推荐(0)
1185. Day of the Week
摘要: 问题: 给出某年某月某日,求该天是周几? Example 1: Input: day = 31, month = 8, year = 2019 Output: "Saturday" Example 2: Input: day = 18, month = 7, year = 1999 Output:
阅读全文
posted @ 2020-07-06 14:19 habibah_chang
阅读(154)
评论(0)
推荐(0)
2020年7月5日
1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold
摘要: 问题: 给定一个二维数组, 求其中正方形区域,使得和<=阈值threshold的最长边长。 Example 1: Input: mat = [[1,1,3,2,4,3,2],[1,1,3,2,4,3,2],[1,1,3,2,4,3,2]], threshold = 4 Output: 2 Expla
阅读全文
posted @ 2020-07-05 10:59 habibah_chang
阅读(158)
评论(0)
推荐(0)
上一页
1
···
21
22
23
24
25
26
27
28
29
···
44
下一页
公告