leetcode.com 2023-12-14
🟡2482.difference-between-ones-and-zeros-in-row-and-column
🏷️ Tags
#array #matrix #simulation
🟡2482.difference-between-ones-and-zeros-in-row-and-column
🏷️ Tags
#array #matrix #simulation
Telegraph
difference-between-ones-and-zeros-in-row-and-column
You are given a 0-indexed m x n binary matrix grid. A 0-indexed m x n difference matrix diff is created with the following procedure:
leetcode.cn 2023-12-15
🟡2415.reverse-odd-levels-of-binary-tree
🏷️ Tags
#tree #depth_first_search #breadth_first_search #binary_tree
🟡2415.reverse-odd-levels-of-binary-tree
🏷️ Tags
#tree #depth_first_search #breadth_first_search #binary_tree
Telegraph
reverse-odd-levels-of-binary-tree
给你一棵 完美 二叉树的根节点 root ,请你反转这棵树中每个 奇数 层的节点值。
leetcode.com 2023-12-17
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
Telegraph
design-a-food-rating-system
Design a food rating system that can do the following:
leetcode.com 2023-12-21
🟡1637.widest-vertical-area-between-two-points-containing-no-points
🏷️ Tags
#array #sorting
🟡1637.widest-vertical-area-between-two-points-containing-no-points
🏷️ Tags
#array #sorting
Telegraph
widest-vertical-area-between-two-points-containing-no-points
Given n points on a 2D plane where points[i] = [xi, yi], Return the widest vertical area between two points such that no points are inside the area. A vertical area is an area of fixed-width extending infinitely along the y-axis (i.e., infinite height). The…
leetcode.cn 2023-12-22
🔴1671.minimum-number-of-removals-to-make-mountain-array
🏷️ Tags
#greedy #array #binary_search #dynamic_programming
🔴1671.minimum-number-of-removals-to-make-mountain-array
🏷️ Tags
#greedy #array #binary_search #dynamic_programming
Telegraph
minimum-number-of-removals-to-make-mountain-array
我们定义 arr 是 山形数组 当且仅当它满足:
leetcode.cn 2023-12-23
🟡1962.remove-stones-to-minimize-the-total
🏷️ Tags
#greedy #array #heap_priority_queue
🟡1962.remove-stones-to-minimize-the-total
🏷️ Tags
#greedy #array #heap_priority_queue
Telegraph
remove-stones-to-minimize-the-total
给你一个整数数组 piles ,数组 下标从 0 开始 ,其中 piles[i] 表示第 i 堆石子中的石子数量。另给你一个整数 k ,请你执行下述操作 恰好 k 次:
leetcode.cn 2023-12-24
🟡1954.minimum-garden-perimeter-to-collect-enough-apples
🏷️ Tags
#math #binary_search
🟡1954.minimum-garden-perimeter-to-collect-enough-apples
🏷️ Tags
#math #binary_search
Telegraph
minimum-garden-perimeter-to-collect-enough-apples
给你一个用无限二维网格表示的花园,每一个 整数坐标处都有一棵苹果树。整数坐标 (i, j) 处的苹果树有 |i| + |j| 个苹果。 你将会买下正中心坐标是 (0, 0) 的一块 正方形土地 ,且每条边都与两条坐标轴之一平行。 给你一个整数 neededApples ,请你返回土地的 最小周长 ,使得 至少 有 neededApples 个苹果在土地 里面或者边缘上。 |x| 的值定义为: