leetcode.cn 2026-03-08
🟡1980.find-unique-binary-string
🏷️ Tags
#array #hash_table #string #backtracking
🟡1980.find-unique-binary-string
🏷️ Tags
#array #hash_table #string #backtracking
Telegraph
find-unique-binary-string
给你一个字符串数组 nums ,该数组由 n 个 互不相同 的二进制字符串组成,且每个字符串长度都是 n 。请你找出并返回一个长度为 n 且 没有出现 在 nums 中的二进制字符串。如果存在多种答案,只需返回 任意一个 即可。 示例 1: 输入:nums = ["01","10"] 输出:"11" 解释:"11" 没有出现在 nums 中。"00" 也是正确答案。 示例 2: 输入:nums = ["00","01"] 输出:"11" 解释:"11" 没有出现在 nums 中。"10" 也是正确答案。…
leetcode.cn 2026-03-09
🟡3129.find-all-possible-stable-binary-arrays-i
🏷️ Tags
#dynamic_programming #prefix_sum
🟡3129.find-all-possible-stable-binary-arrays-i
🏷️ Tags
#dynamic_programming #prefix_sum
Telegraph
find-all-possible-stable-binary-arrays-i
给你 3 个正整数 zero ,one 和 limit 。 一个 二进制数组 arr 如果满足以下条件,那么我们称它是 稳定的 :
leetcode.com 2026-03-09
🟡3129.find-all-possible-stable-binary-arrays-i
🏷️ Tags
#dynamic_programming #prefix_sum
🟡3129.find-all-possible-stable-binary-arrays-i
🏷️ Tags
#dynamic_programming #prefix_sum
Telegraph
find-all-possible-stable-binary-arrays-i
You are given 3 positive integers zero, one, and limit. A binary array arr is called stable if:
leetcode.cn 2026-03-10
🔴3130.find-all-possible-stable-binary-arrays-ii
🏷️ Tags
#dynamic_programming #prefix_sum
🔴3130.find-all-possible-stable-binary-arrays-ii
🏷️ Tags
#dynamic_programming #prefix_sum
Telegraph
find-all-possible-stable-binary-arrays-ii
给你 3 个正整数 zero ,one 和 limit 。 一个 二进制数组 arr 如果满足以下条件,那么我们称它是 稳定的 :
leetcode.com 2026-03-10
🔴3130.find-all-possible-stable-binary-arrays-ii
🏷️ Tags
#dynamic_programming #prefix_sum
🔴3130.find-all-possible-stable-binary-arrays-ii
🏷️ Tags
#dynamic_programming #prefix_sum
Telegraph
find-all-possible-stable-binary-arrays-ii
You are given 3 positive integers zero, one, and limit. A binary array arr is called stable if:
leetcode.cn 2026-03-12
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
Telegraph
maximize-spanning-tree-stability-with-upgrades
给你一个整数 n,表示编号从 0 到 n - 1 的 n 个节点,以及一个 edges 列表,其中 edges[i] = [ui, vi, si, musti]:
leetcode.com 2026-03-12
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
Telegraph
maximize-spanning-tree-stability-with-upgrades
You are given an integer n, representing n nodes numbered from 0 to n - 1 and a list of edges, where edges[i] = [ui, vi, si, musti]:
leetcode.cn 2026-03-13
🟡3296.minimum-number-of-seconds-to-make-mountain-height-zero
🏷️ Tags
#greedy #array #math #binary_search #heap_priority_queue
🟡3296.minimum-number-of-seconds-to-make-mountain-height-zero
🏷️ Tags
#greedy #array #math #binary_search #heap_priority_queue
Telegraph
minimum-number-of-seconds-to-make-mountain-height-zero
给你一个整数 mountainHeight 表示山的高度。 同时给你一个整数数组 workerTimes,表示工人们的工作时间(单位:秒)。 工人们需要 同时 进行工作以 降低 山的高度。对于工人 i :
leetcode.com 2026-03-13
🟡3296.minimum-number-of-seconds-to-make-mountain-height-zero
🏷️ Tags
#greedy #array #math #binary_search #heap_priority_queue
🟡3296.minimum-number-of-seconds-to-make-mountain-height-zero
🏷️ Tags
#greedy #array #math #binary_search #heap_priority_queue
Telegraph
minimum-number-of-seconds-to-make-mountain-height-zero
You are given an integer mountainHeight denoting the height of a mountain. You are also given an integer array workerTimes representing the work time of workers in seconds. The workers work simultaneously to reduce the height of the mountain. For worker i:
leetcode.cn 2026-03-14
🟡1415.the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
🏷️ Tags
#string #backtracking
🟡1415.the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
🏷️ Tags
#string #backtracking
Telegraph
the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
一个 「开心字符串」定义为:
leetcode.com 2026-03-14
🟡1415.the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
🏷️ Tags
#string #backtracking
🟡1415.the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
🏷️ Tags
#string #backtracking
Telegraph
the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
A happy string is a string that:
leetcode.cn 2026-03-16
🟡1878.get-biggest-three-rhombus-sums-in-a-grid
🏷️ Tags
#array #math #matrix #prefix_sum #sorting #heap_priority_queue
🟡1878.get-biggest-three-rhombus-sums-in-a-grid
🏷️ Tags
#array #math #matrix #prefix_sum #sorting #heap_priority_queue
Telegraph
get-biggest-three-rhombus-sums-in-a-grid
给你一个 m x n 的整数矩阵 grid 。 菱形和 指的是 grid 中一个正菱形 边界 上的元素之和。本题中的菱形必须为正方形旋转45度,且四个角都在一个格子当中。下图是四个可行的菱形,每个菱形和应该包含的格子都用了相应颜色标注在图中。 注意,菱形可以是一个面积为 0 的区域,如上图中右下角的紫色菱形所示。 请你按照 降序 返回 grid 中三个最大的 互不相同的菱形和 。如果不同的和少于三个,则将它们全部返回。 示例 1: 输入:grid = [[3,4,5,1,3],[3,3,4,2,3]…
leetcode.com 2026-03-16
🟡1878.get-biggest-three-rhombus-sums-in-a-grid
🏷️ Tags
#array #math #matrix #prefix_sum #sorting #heap_priority_queue
🟡1878.get-biggest-three-rhombus-sums-in-a-grid
🏷️ Tags
#array #math #matrix #prefix_sum #sorting #heap_priority_queue
Telegraph
get-biggest-three-rhombus-sums-in-a-grid
You are given an m x n integer matrix grid. A rhombus sum is the sum of the elements that form the border of a regular rhombus shape in grid. The rhombus must have the shape of a square rotated 45 degrees with each of the corners centered in a grid…
leetcode.cn 2026-03-17
🟡1727.largest-submatrix-with-rearrangements
🏷️ Tags
#greedy #array #matrix #sorting
🟡1727.largest-submatrix-with-rearrangements
🏷️ Tags
#greedy #array #matrix #sorting
Telegraph
largest-submatrix-with-rearrangements
给你一个二进制矩阵 matrix ,它的大小为 m x n ,你可以将 matrix 中的 列 按任意顺序重新排列。 请你返回最优方案下将 matrix 重新排列后,全是 1 的子矩阵面积。 示例 1: 输入:matrix = [[0,0,1],[1,1,1],[1,0,1]] 输出:4 解释:你可以按照上图方式重新排列矩阵的每一列。 最大的全 1 子矩阵是上图中加粗的部分,面积为 4 。 示例 2: 输入:matrix = [[1,0,1,0,1]] 输出:3 解释:你可以按照上图方式重新排列矩阵的每一列。…
leetcode.com 2026-03-17
🟡1727.largest-submatrix-with-rearrangements
🏷️ Tags
#greedy #array #matrix #sorting
🟡1727.largest-submatrix-with-rearrangements
🏷️ Tags
#greedy #array #matrix #sorting
Telegraph
largest-submatrix-with-rearrangements
You are given a binary matrix matrix of size m x n, and you are allowed to rearrange the columns of the matrix in any order. Return the area of the largest submatrix within matrix where every element of the submatrix is 1 after reordering the columns optimally.…
leetcode.cn 2026-03-18
🟡3070.count-submatrices-with-top-left-element-and-sum-less-than-k
🏷️ Tags
#array #matrix #prefix_sum
🟡3070.count-submatrices-with-top-left-element-and-sum-less-than-k
🏷️ Tags
#array #matrix #prefix_sum
Telegraph
count-submatrices-with-top-left-element-and-sum-less-than-k
给你一个下标从 0 开始的整数矩阵 grid 和一个整数 k。 返回包含 grid 左上角元素、元素和小于或等于 k 的 子矩阵的数目。 示例 1: 输入:grid = [[7,6,3],[6,6,1]], k = 18 输出:4 解释:如上图所示,只有 4 个子矩阵满足:包含 grid 的左上角元素,并且元素和小于或等于 18 。 示例 2: 输入:grid = [[7,2,9],[1,5,0],[2,6,6]], k = 20 输出:6 解释:如上图所示,只有 6 个子矩阵满足:包含 grid …
leetcode.com 2026-03-18
🟡3070.count-submatrices-with-top-left-element-and-sum-less-than-k
🏷️ Tags
#array #matrix #prefix_sum
🟡3070.count-submatrices-with-top-left-element-and-sum-less-than-k
🏷️ Tags
#array #matrix #prefix_sum
Telegraph
count-submatrices-with-top-left-element-and-sum-less-than-k
You are given a 0-indexed integer matrix grid and an integer k. Return the number of submatrices that contain the top-left element of the grid, and have a sum less than or equal to k. Example 1: Input: grid = [[7,6,3],[6,6,1]], k = 18 Output: 4 Explanation:…