leetcode.cn 2025-12-22
🔴960.delete-columns-to-make-sorted-iii
🏷️ Tags
#array #string #dynamic_programming
🔴960.delete-columns-to-make-sorted-iii
🏷️ Tags
#array #string #dynamic_programming
Telegraph
delete-columns-to-make-sorted-iii
给定由 n 个小写字母字符串组成的数组 strs ,其中每个字符串长度相等。 选取一个删除索引序列,对于 strs 中的每个字符串,删除对应每个索引处的字符。 比如,有 strs = ["abcdef","uvwxyz"] ,删除索引序列 {0, 2, 3} ,删除后为 ["bef", "vyz"] 。 假设,我们选择了一组删除索引 answer ,那么在执行删除操作之后,最终得到的数组的行中的 每个元素 都是按字典序排列的(即 (strs[0][0] <= strs[0][1] <= ... <= s…
leetcode.com 2025-12-22
🔴960.delete-columns-to-make-sorted-iii
🏷️ Tags
#array #string #dynamic_programming
🔴960.delete-columns-to-make-sorted-iii
🏷️ Tags
#array #string #dynamic_programming
Telegraph
delete-columns-to-make-sorted-iii
You are given an array of n strings strs, all of the same length. We may choose any deletion indices, and we delete all the characters in those indices for each string. For example, if we have strs = ["abcdef","uvwxyz"] and deletion indices {0, 2, 3}, then…
leetcode.cn 2025-12-23
🟡2054.two-best-non-overlapping-events
🏷️ Tags
#array #binary_search #dynamic_programming #sorting #heap_priority_queue
🟡2054.two-best-non-overlapping-events
🏷️ Tags
#array #binary_search #dynamic_programming #sorting #heap_priority_queue
Telegraph
two-best-non-overlapping-events
给你一个下标从 0 开始的二维整数数组 events ,其中 events[i] = [startTimei, endTimei, valuei] 。第 i 个活动开始于 startTimei ,结束于 endTimei ,如果你参加这个活动,那么你可以得到价值 valuei 。你 最多 可以参加 两个时间不重叠 活动,使得它们的价值之和 最大 。 请你返回价值之和的 最大值 。 注意,活动的开始时间和结束时间是 包括 在活动时间内的,也就是说,你不能参加两个活动且它们之一的开始时间等于另一个活动的结束…
leetcode.com 2025-12-23
🟡2054.two-best-non-overlapping-events
🏷️ Tags
#array #binary_search #dynamic_programming #sorting #heap_priority_queue
🟡2054.two-best-non-overlapping-events
🏷️ Tags
#array #binary_search #dynamic_programming #sorting #heap_priority_queue
Telegraph
two-best-non-overlapping-events
You are given a 0-indexed 2D integer array of events where events[i] = [startTimei, endTimei, valuei]. The ith event starts at startTimei and ends at endTimei, and if you attend this event, you will receive a value of valuei. You can choose at most two non…
leetcode.cn 2025-12-27
🔴2402.meeting-rooms-iii
🏷️ Tags
#array #hash_table #sorting #simulation #heap_priority_queue
🔴2402.meeting-rooms-iii
🏷️ Tags
#array #hash_table #sorting #simulation #heap_priority_queue
Telegraph
meeting-rooms-iii
给你一个整数 n ,共有编号从 0 到 n - 1 的 n 个会议室。 给你一个二维整数数组 meetings ,其中 meetings[i] = [starti, endi] 表示一场会议将会在 半闭 时间区间 [starti, endi) 举办。所有 starti 的值 互不相同 。 会议将会按以下方式分配给会议室:
leetcode.com 2025-12-27
🔴2402.meeting-rooms-iii
🏷️ Tags
#array #hash_table #sorting #simulation #heap_priority_queue
🔴2402.meeting-rooms-iii
🏷️ Tags
#array #hash_table #sorting #simulation #heap_priority_queue
Telegraph
meeting-rooms-iii
You are given an integer n. There are n rooms numbered from 0 to n - 1. You are given a 2D integer array meetings where meetings[i] = [starti, endi] means that a meeting will be held during the half-closed time interval [starti, endi). All the values of starti…
leetcode.cn 2025-12-28
🟢1351.count-negative-numbers-in-a-sorted-matrix
🏷️ Tags
#array #binary_search #matrix
🟢1351.count-negative-numbers-in-a-sorted-matrix
🏷️ Tags
#array #binary_search #matrix
Telegraph
count-negative-numbers-in-a-sorted-matrix
给你一个 m * n 的矩阵 grid,矩阵中的元素无论是按行还是按列,都以非严格递减顺序排列。 请你统计并返回 grid 中 负数 的数目。 示例 1: 输入:grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]] 输出:8 解释:矩阵中共有 8 个负数。 示例 2: 输入:grid = [[3,2],[1,0]] 输出:0 提示:
leetcode.com 2025-12-28
🟢1351.count-negative-numbers-in-a-sorted-matrix
🏷️ Tags
#array #binary_search #matrix
🟢1351.count-negative-numbers-in-a-sorted-matrix
🏷️ Tags
#array #binary_search #matrix
Telegraph
count-negative-numbers-in-a-sorted-matrix
Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid. Example 1: Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]] Output: 8 Explanation: There are 8…
leetcode.cn 2025-12-29
🟡756.pyramid-transition-matrix
🏷️ Tags
#bit_manipulation #hash_table #string #backtracking
🟡756.pyramid-transition-matrix
🏷️ Tags
#bit_manipulation #hash_table #string #backtracking
Telegraph
pyramid-transition-matrix
你正在把积木堆成金字塔。每个块都有一个颜色,用一个字母表示。每一行的块比它下面的行 少一个块 ,并且居中。 为了使金字塔美观,只有特定的 三角形图案 是允许的。一个三角形的图案由 两个块 和叠在上面的 单个块 组成。模式是以三个字母字符串的列表形式 allowed 给出的,其中模式的前两个字符分别表示左右底部块,第三个字符表示顶部块。
leetcode.com 2025-12-29
🟡756.pyramid-transition-matrix
🏷️ Tags
#bit_manipulation #hash_table #string #backtracking
🟡756.pyramid-transition-matrix
🏷️ Tags
#bit_manipulation #hash_table #string #backtracking
Telegraph
pyramid-transition-matrix
You are stacking blocks to form a pyramid. Each block has a color, which is represented by a single letter. Each row of blocks contains one less block than the row beneath it and is centered on top. To make the pyramid aesthetically pleasing, there are only…