1476. Subrectangle Queries
二维数组的更新与查找。
1 | class SubrectangleQueries: |
1480. Running Sum of 1d Array
统计动态和,始终用一个变量记录当前值,遍历。
1 | class Solution: |
1481. Least Number of Unique Integers after K Removals
对 arr 中出现数字的次数进行统计,并按照升序进行排序,遍历排序后的结果,如果 sum + elem_v 小于等于 k,那么表示此时还可以继续删除数字。
1 | class Solution: |
1482. Minimum Number of Days to Make m Bouquets
对所有天数进行排序,使用二分法判断是否满足,其中判断是否可以组成k 朵花需要注意判断是否连续。
1 | class Solution: |
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
题目描述不清楚,我理解是 dfs ,只是传入的是两个 Tree,判断符合条件后直接返回另一个 Tree Node。
1 | # Definition for a binary tree node. |