leetcode.cn 2025-08-23
🔴3197.find-the-minimum-area-to-cover-all-ones-ii
🏷️ Tags
#array #enumeration #matrix
🔴3197.find-the-minimum-area-to-cover-all-ones-ii
🏷️ Tags
#array #enumeration #matrix
Telegraph
find-the-minimum-area-to-cover-all-ones-ii
给你一个二维 二进制 数组 grid。你需要找到 3 个 不重叠、面积 非零 、边在水平方向和竖直方向上的矩形,并且满足 grid 中所有的 1 都在这些矩形的内部。 返回这些矩形面积之和的 最小 可能值。 注意,这些矩形可以相接。 示例 1: 输入: grid = [[1,0,1],[1,1,1]] 输出: 5 解释:
leetcode.com 2025-08-23
🔴3197.find-the-minimum-area-to-cover-all-ones-ii
🏷️ Tags
#array #enumeration #matrix
🔴3197.find-the-minimum-area-to-cover-all-ones-ii
🏷️ Tags
#array #enumeration #matrix
Telegraph
find-the-minimum-area-to-cover-all-ones-ii
You are given a 2D binary array grid. You need to find 3 non-overlapping rectangles having non-zero areas with horizontal and vertical sides such that all the 1's in grid lie inside these rectangles. Return the minimum possible sum of the area of these rectangles.…
leetcode.cn 2025-09-02
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-i
给你一个 n x 2 的二维数组 points ,它表示二维平面上的一些点坐标,其中 points[i] = [xi, yi] 。 计算点对 (A, B) 的数量,其中
leetcode.com 2025-09-02
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-i
You are given a 2D array points of size n x 2 representing integer coordinates of some points on a 2D plane, where points[i] = [xi, yi]. Count the number of pairs of points (A, B), where
leetcode.cn 2025-09-03
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-ii
给你一个 n x 2 的二维数组 points ,它表示二维平面上的一些点坐标,其中 points[i] = [xi, yi] 。 我们定义 x 轴的正方向为 右 (x 轴递增的方向),x 轴的负方向为 左 (x 轴递减的方向)。类似的,我们定义 y 轴的正方向为 上 (y 轴递增的方向),y 轴的负方向为 下 (y 轴递减的方向)。 你需要安排这 n 个人的站位,这 n 个人中包括 Alice 和 Bob 。你需要确保每个点处 恰好 有 一个 人。同时,Alice 想跟 Bob 单独玩耍,所以 Alice…
leetcode.com 2025-09-03
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-ii
You are given a 2D array points of size n x 2 representing integer coordinates of some points on a 2D-plane, where points[i] = [xi, yi]. We define the right direction as positive x-axis (increasing x-coordinate) and the left direction as negative x-axis (decreasing…
leetcode.cn 2025-09-05
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
Telegraph
minimum-operations-to-make-the-integer-zero
给你两个整数:num1 和 num2 。 在一步操作中,你需要从范围 [0, 60] 中选出一个整数 i ,并从 num1 减去 2i + num2 。 请你计算,要想使 num1 等于 0 需要执行的最少操作数,并以整数形式返回。 如果无法使 num1 等于 0 ,返回 -1 。 示例 1: 输入:num1 = 3, num2 = -2 输出:3 解释:可以执行下述步骤使 3 等于 0 : - 选择 i = 2 ,并从 3 减去 22 + (-2) ,num1 = 3 - (4 + (-2)) =…
leetcode.com 2025-09-05
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
Telegraph
minimum-operations-to-make-the-integer-zero
You are given two integers num1 and num2. In one operation, you can choose integer i in the range [0, 60] and subtract 2i + num2 from num1. Return the integer denoting the minimum number of operations needed to make num1 equal to 0. If it is impossible to…
leetcode.cn 2025-10-19
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
Telegraph
lexicographically-smallest-string-after-applying-operations
给你一个字符串 s 以及两个整数 a 和 b 。其中,字符串 s 的长度为偶数,且仅由数字 0 到 9 组成。 你可以在 s 上按任意顺序多次执行下面两个操作之一:
leetcode.com 2025-10-19
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
Telegraph
lexicographically-smallest-string-after-applying-operations
You are given a string s of even length consisting of digits from 0 to 9, and two integers a and b. You can apply either of the following two operations any number of times and in any order on s:
leetcode.cn 2025-10-24
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
Telegraph
next-greater-numerically-balanced-number
如果整数 x 满足:对于每个数位 d ,这个数位 恰好 在 x 中出现 d 次。那么整数 x 就是一个 数值平衡数 。 给你一个整数 n ,请你返回 严格大于 n 的 最小数值平衡数 。 示例 1: 输入:n = 1 输出:22 解释: 22 是一个数值平衡数,因为: - 数字 2 出现 2 次 这也是严格大于 1 的最小数值平衡数。 示例 2: 输入:n = 1000 输出:1333 解释: 1333 是一个数值平衡数,因为: - 数字 1 出现 1 次。 - 数字 3 出现 3 次。 这也是严格大于…
leetcode.com 2025-10-24
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
Telegraph
next-greater-numerically-balanced-number
An integer x is numerically balanced if for every digit d in the number x, there are exactly d occurrences of that digit in x. Given an integer n, return the smallest numerically balanced number strictly greater than n. Example 1: Input: n = 1 Output: 22…
leetcode.cn 2025-11-15
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
Telegraph
count-the-number-of-substrings-with-dominant-ones
给你一个二进制字符串 s。 请你统计并返回其中 1 显著 的 子字符串 的数量。 如果字符串中 1 的数量 大于或等于 0 的数量的 平方,则认为该字符串是一个 1 显著 的字符串 。 示例 1: 输入:s = "00011" 输出:5 解释: 1 显著的子字符串如下表所示。
leetcode.com 2025-11-15
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
Telegraph
count-the-number-of-substrings-with-dominant-ones
You are given a binary string s. Return the number of substrings with dominant ones. A string has dominant ones if the number of ones in the string is greater than or equal to the square of the number of zeros in the string. Example 1: Input: s = "00011"…