leetcode.cn 2025-08-24
🟡1493.longest-subarray-of-1s-after-deleting-one-element
🏷️ Tags
#array #dynamic_programming #sliding_window
🟡1493.longest-subarray-of-1s-after-deleting-one-element
🏷️ Tags
#array #dynamic_programming #sliding_window
Telegraph
longest-subarray-of-1s-after-deleting-one-element
给你一个二进制数组 nums ,你需要从中删掉一个元素。 请你在删掉元素的结果数组中,返回最长的且只包含 1 的非空子数组的长度。 如果不存在这样的子数组,请返回 0 。 提示 1: 输入:nums = [1,1,0,1] 输出:3 解释:删掉位置 2 的数后,[1,1,1] 包含 3 个 1 。 示例 2: 输入:nums = [0,1,1,1,0,1,1,0,1] 输出:5 解释:删掉位置 4 的数字后,[0,1,1,1,1,1,0,1] 的最长全 1 子数组为 [1,1,1,1,1] 。 示例…
leetcode.com 2025-08-24
🟡1493.longest-subarray-of-1s-after-deleting-one-element
🏷️ Tags
#array #dynamic_programming #sliding_window
🟡1493.longest-subarray-of-1s-after-deleting-one-element
🏷️ Tags
#array #dynamic_programming #sliding_window
Telegraph
longest-subarray-of-1s-after-deleting-one-element
Given a binary array nums, you should delete one element from it. Return the size of the longest non-empty subarray containing only 1's in the resulting array. Return 0 if there is no such subarray. Example 1: Input: nums = [1,1,0,1] Output: 3 Explanation:…
leetcode.cn 2025-08-27
🔴3459.length-of-longest-v-shaped-diagonal-segment
🏷️ Tags
#memoization #array #dynamic_programming #matrix
🔴3459.length-of-longest-v-shaped-diagonal-segment
🏷️ Tags
#memoization #array #dynamic_programming #matrix
Telegraph
length-of-longest-v-shaped-diagonal-segment
给你一个大小为 n x m 的二维整数矩阵 grid,其中每个元素的值为 0、1 或 2。 V 形对角线段 定义如下:
leetcode.com 2025-08-27
🔴3459.length-of-longest-v-shaped-diagonal-segment
🏷️ Tags
#memoization #array #dynamic_programming #matrix
🔴3459.length-of-longest-v-shaped-diagonal-segment
🏷️ Tags
#memoization #array #dynamic_programming #matrix
Telegraph
length-of-longest-v-shaped-diagonal-segment
You are given a 2D integer matrix grid of size n x m, where each element is either 0, 1, or 2. A V-shaped diagonal segment is defined as:
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