leetcode.com 2025-04-29
🟡2962.count-subarrays-where-max-element-appears-at-least-k-times
🏷️ Tags
#array #sliding_window
🟡2962.count-subarrays-where-max-element-appears-at-least-k-times
🏷️ Tags
#array #sliding_window
Telegraph
count-subarrays-where-max-element-appears-at-least-k-times
You are given an integer array nums and a positive integer k. Return the number of subarrays where the maximum element of nums appears at least k times in that subarray. A subarray is a contiguous sequence of elements within an array. Example 1: Input:…
leetcode.cn 2025-05-01
🔴2071.maximum-number-of-tasks-you-can-assign
🏷️ Tags
#greedy #queue #array #binary_search #sorting #monotonic_queue
🔴2071.maximum-number-of-tasks-you-can-assign
🏷️ Tags
#greedy #queue #array #binary_search #sorting #monotonic_queue
Telegraph
maximum-number-of-tasks-you-can-assign
给你 n 个任务和 m 个工人。每个任务需要一定的力量值才能完成,需要的力量值保存在下标从 0 开始的整数数组 tasks 中,第 i 个任务需要 tasks[i] 的力量才能完成。每个工人的力量值保存在下标从 0 开始的整数数组 workers 中,第 j 个工人的力量值为 workers[j] 。每个工人只能完成 一个 任务,且力量值需要 大于等于 该任务的力量要求值(即 workers[j] >= tasks[i] )。 除此以外,你还有 pills 个神奇药丸,可以给 一个工人的力量值 增加 s…
leetcode.com 2025-05-01
🔴2071.maximum-number-of-tasks-you-can-assign
🏷️ Tags
#greedy #queue #array #binary_search #sorting #monotonic_queue
🔴2071.maximum-number-of-tasks-you-can-assign
🏷️ Tags
#greedy #queue #array #binary_search #sorting #monotonic_queue
Telegraph
maximum-number-of-tasks-you-can-assign
You have n tasks and m workers. Each task has a strength requirement stored in a 0-indexed integer array tasks, with the ith task requiring tasks[i] strength to complete. The strength of each worker is stored in a 0-indexed integer array workers, with the…
leetcode.cn 2025-05-07
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-i
有一个地窖,地窖中有 n x m 个房间,它们呈网格状排布。 给你一个大小为 n x m 的二维数组 moveTime ,其中 moveTime[i][j] 表示在这个时刻 以后 你才可以 开始 往这个房间 移动 。你在时刻 t = 0 时从房间 (0, 0) 出发,每次可以移动到 相邻 的一个房间。在 相邻 房间之间移动需要的时间为 1 秒。
leetcode.com 2025-05-07
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-i
There is a dungeon with n x m rooms arranged as a grid. You are given a 2D array moveTime of size n x m, where moveTime[i][j] represents the minimum time in seconds when you can start moving to that room. You start from the room (0, 0) at time t = 0 and can…
leetcode.cn 2025-05-08
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-ii
有一个地窖,地窖中有 n x m 个房间,它们呈网格状排布。 给你一个大小为 n x m 的二维数组 moveTime ,其中 moveTime[i][j] 表示在这个时刻 以后 你才可以 开始 往这个房间 移动 。你在时刻 t = 0 时从房间 (0, 0) 出发,每次可以移动到 相邻 的一个房间。在 相邻 房间之间移动需要的时间为:第一次花费 1 秒,第二次花费 2 秒,第三次花费 1 秒,第四次花费 2 秒……如此 往复 。
leetcode.com 2025-05-08
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-ii
There is a dungeon with n x m rooms arranged as a grid. You are given a 2D array moveTime of size n x m, where moveTime[i][j] represents the minimum time in seconds when you can start moving to that room. You start from the room (0, 0) at time t = 0 and can…
leetcode.cn 2025-05-09
🔴3343.count-number-of-balanced-permutations
🏷️ Tags
#math #string #dynamic_programming #combinatorics
🔴3343.count-number-of-balanced-permutations
🏷️ Tags
#math #string #dynamic_programming #combinatorics
Telegraph
count-number-of-balanced-permutations
给你一个字符串 num 。如果一个数字字符串的奇数位下标的数字之和与偶数位下标的数字之和相等,那么我们称这个数字字符串是 平衡的 。