leetcode.com 2026-03-22
🟢1886.determine-whether-matrix-can-be-obtained-by-rotation
🏷️ Tags
#array #matrix
🟢1886.determine-whether-matrix-can-be-obtained-by-rotation
🏷️ Tags
#array #matrix
Telegraph
determine-whether-matrix-can-be-obtained-by-rotation
Given two n x n binary matrices mat and target, return true if it is possible to make mat equal to target by rotating mat in 90-degree increments, or false otherwise. Example 1: Input: mat = [[0,1],[1,0]], target = [[1,0],[0,1]] Output: true Explanation:…
leetcode.cn 2026-03-23
🟡1594.maximum-non-negative-product-in-a-matrix
🏷️ Tags
#array #dynamic_programming #matrix
🟡1594.maximum-non-negative-product-in-a-matrix
🏷️ Tags
#array #dynamic_programming #matrix
Telegraph
maximum-non-negative-product-in-a-matrix
给你一个大小为 m x n 的矩阵 grid 。最初,你位于左上角 (0, 0) ,每一步,你可以在矩阵中 向右 或 向下 移动。 在从左上角 (0, 0) 开始到右下角 (m - 1, n - 1) 结束的所有路径中,找出具有 最大非负积 的路径。路径的积是沿路径访问的单元格中所有整数的乘积。 返回 最大非负积 对 109 + 7 取余 的结果。如果最大积为 负数 ,则返回 -1 。 注意,取余是在得到最大积之后执行的。 示例 1: 输入:grid = [[-1,-2,-3],[-2,-3,-3]…
❤1
leetcode.com 2026-03-23
🟡1594.maximum-non-negative-product-in-a-matrix
🏷️ Tags
#array #dynamic_programming #matrix
🟡1594.maximum-non-negative-product-in-a-matrix
🏷️ Tags
#array #dynamic_programming #matrix
Telegraph
maximum-non-negative-product-in-a-matrix
You are given a m x n matrix grid. Initially, you are located at the top-left corner (0, 0), and in each step, you can only move right or down in the matrix. Among all possible paths starting from the top-left corner (0, 0) and ending in the bottom-right…
leetcode.cn 2026-03-25
🟡3546.equal-sum-grid-partition-i
🏷️ Tags
#array #enumeration #matrix #prefix_sum
🟡3546.equal-sum-grid-partition-i
🏷️ Tags
#array #enumeration #matrix #prefix_sum
Telegraph
equal-sum-grid-partition-i
给你一个由正整数组成的 m x n 矩阵 grid。你的任务是判断是否可以通过 一条水平或一条垂直分割线 将矩阵分割成两部分,使得:
leetcode.com 2026-03-25
🟡3546.equal-sum-grid-partition-i
🏷️ Tags
#array #enumeration #matrix #prefix_sum
🟡3546.equal-sum-grid-partition-i
🏷️ Tags
#array #enumeration #matrix #prefix_sum
Telegraph
equal-sum-grid-partition-i
You are given an m x n matrix grid of positive integers. Your task is to determine if it is possible to make either one horizontal or one vertical cut on the grid such that:
leetcode.cn 2026-03-26
🔴3548.equal-sum-grid-partition-ii
🏷️ Tags
#array #hash_table #enumeration #matrix #prefix_sum
🔴3548.equal-sum-grid-partition-ii
🏷️ Tags
#array #hash_table #enumeration #matrix #prefix_sum
Telegraph
equal-sum-grid-partition-ii
给你一个由正整数组成的 m x n 矩阵 grid。你的任务是判断是否可以通过 一条水平或一条垂直分割线 将矩阵分割成两部分,使得:
leetcode.com 2026-03-26
🔴3548.equal-sum-grid-partition-ii
🏷️ Tags
#array #hash_table #enumeration #matrix #prefix_sum
🔴3548.equal-sum-grid-partition-ii
🏷️ Tags
#array #hash_table #enumeration #matrix #prefix_sum
Telegraph
equal-sum-grid-partition-ii
You are given an m x n matrix grid of positive integers. Your task is to determine if it is possible to make either one horizontal or one vertical cut on the grid such that:
leetcode.cn 2026-03-27
🟢2946.matrix-similarity-after-cyclic-shifts
🏷️ Tags
#array #math #matrix #simulation
🟢2946.matrix-similarity-after-cyclic-shifts
🏷️ Tags
#array #math #matrix #simulation
Telegraph
matrix-similarity-after-cyclic-shifts
给你一个下标从 0 开始且大小为 m x n 的整数矩阵 mat 和一个整数 k 。请你将矩阵中的 奇数 行循环 右 移 k 次,偶数 行循环 左 移 k 次。 如果初始矩阵和最终矩阵完全相同,则返回 true ,否则返回 false 。 示例 1: 输入:mat = [[1,2,1,2],[5,5,5,5],[6,3,6,3]], k = 2 输出:true 解释: 初始矩阵如图一所示。 图二表示对奇数行右移一次且对偶数行左移一次后的矩阵状态。 图三是经过两次循环移位后的最终矩阵状态,与初始矩阵相同。…
leetcode.com 2026-03-27
🟢2946.matrix-similarity-after-cyclic-shifts
🏷️ Tags
#array #math #matrix #simulation
🟢2946.matrix-similarity-after-cyclic-shifts
🏷️ Tags
#array #math #matrix #simulation
Telegraph
matrix-similarity-after-cyclic-shifts
You are given an m x n integer matrix mat and an integer k. The matrix rows are 0-indexed. The following proccess happens k times:
leetcode.cn 2026-03-28
🔴2573.find-the-string-with-lcp
🏷️ Tags
#greedy #union_find #array #string #dynamic_programming #matrix
🔴2573.find-the-string-with-lcp
🏷️ Tags
#greedy #union_find #array #string #dynamic_programming #matrix
Telegraph
find-the-string-with-lcp
对任一由 n 个小写英文字母组成的字符串 word ,我们可以定义一个 n x n 的矩阵,并满足:
leetcode.cn 2026-03-30
🟡2840.check-if-strings-can-be-made-equal-with-operations-ii
🏷️ Tags
#hash_table #string #sorting
🟡2840.check-if-strings-can-be-made-equal-with-operations-ii
🏷️ Tags
#hash_table #string #sorting
Telegraph
check-if-strings-can-be-made-equal-with-operations-ii
给你两个字符串 s1 和 s2 ,两个字符串长度都为 n ,且只包含 小写 英文字母。 你可以对两个字符串中的 任意一个 执行以下操作 任意 次:
leetcode.com 2026-03-30
🟡2840.check-if-strings-can-be-made-equal-with-operations-ii
🏷️ Tags
#hash_table #string #sorting
🟡2840.check-if-strings-can-be-made-equal-with-operations-ii
🏷️ Tags
#hash_table #string #sorting
Telegraph
check-if-strings-can-be-made-equal-with-operations-ii
You are given two strings s1 and s2, both of length n, consisting of lowercase English letters. You can apply the following operation on any of the two strings any number of times:
leetcode.cn 2026-03-31
🔴3474.lexicographically-smallest-generated-string
🏷️ Tags
#greedy #string #string_matching
🔴3474.lexicographically-smallest-generated-string
🏷️ Tags
#greedy #string #string_matching
Telegraph
lexicographically-smallest-generated-string
给你两个字符串,str1 和 str2,其长度分别为 n 和 m 。
leetcode.com 2026-03-31
🔴3474.lexicographically-smallest-generated-string
🏷️ Tags
#greedy #string #string_matching
🔴3474.lexicographically-smallest-generated-string
🏷️ Tags
#greedy #string #string_matching
Telegraph
lexicographically-smallest-generated-string
You are given two strings, str1 and str2, of lengths n and m, respectively. A string word of length n + m - 1 is defined to be generated by str1 and str2 if it satisfies the following conditions for each index 0 <= i <= n - 1: