LeetCode biweekly contest 19
| Rank | Name | Score | Finish Time | Q1 (3) | Q2 (4) | Q3 (5) | Q4 (6) |
|---|---|---|---|---|---|---|---|
| 179 / 3745 | YoungForest | 18 | 0:41:10 | 0:02:39 | 0:10:36 | 0:12:53 | 0:36:10 1 |
回国后第一次参加双周赛,手有些生,状态还在恢复。最近因为新型冠状病毒的瘟疫,一直在家隔离,除了买菜外几乎无法出门。今年的年味也因此没有了。我在家呆的几乎都快产后抑郁了。比赛结果还行。手速场也是我一直不擅长的类型。
1342. Number of Steps to Reduce a Number to Zero
签到题。直接模拟 除2 和 减一 的2中操作即可。
时间复杂度: O(log N),
空间复杂度: O(1).
1 | class Solution { |
1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
简单的滑动窗口,可以直接套用模版。
时间复杂度: O(N),
空间复杂度: O(1).
1 | class Solution { |

