leetcode.cn 2025-12-18
🟡3652.best-time-to-buy-and-sell-stock-using-strategy
🏷️ Tags
#array #prefix_sum #sliding_window
🟡3652.best-time-to-buy-and-sell-stock-using-strategy
🏷️ Tags
#array #prefix_sum #sliding_window
Telegraph
best-time-to-buy-and-sell-stock-using-strategy
给你两个整数数组 prices 和 strategy,其中:
leetcode.cn 2025-12-19
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
Telegraph
find-all-people-with-secret
给你一个整数 n ,表示有 n 个专家从 0 到 n - 1 编号。另外给你一个下标从 0 开始的二维整数数组 meetings ,其中 meetings[i] = [xi, yi, timei] 表示专家 xi 和专家 yi 在时间 timei 要开一场会。一个专家可以同时参加 多场会议 。最后,给你一个整数 firstPerson 。 专家 0 有一个 秘密 ,最初,他在时间 0 将这个秘密分享给了专家 firstPerson 。接着,这个秘密会在每次有知晓这个秘密的专家参加会议时进行传播。更正式的表达是,每次会议,如果专家…
leetcode.com 2025-12-19
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
Telegraph
find-all-people-with-secret
You are given an integer n indicating there are n people numbered from 0 to n - 1. You are also given a 0-indexed 2D integer array meetings where meetings[i] = [xi, yi, timei] indicates that person xi and person yi have a meeting at timei. A person may attend…
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…