leetcode.com 2025-10-07
🟡1488.avoid-flood-in-the-city
🏷️ Tags
#greedy #array #hash_table #binary_search #heap_priority_queue
🟡1488.avoid-flood-in-the-city
🏷️ Tags
#greedy #array #hash_table #binary_search #heap_priority_queue
Telegraph
avoid-flood-in-the-city
Your country has an infinite number of lakes. Initially, all the lakes are empty, but when it rains over the nth lake, the nth lake becomes full of water. If it rains over a lake that is full of water, there will be a flood. Your goal is to avoid floods in…
leetcode.cn 2025-10-16
🟡2598.smallest-missing-non-negative-integer-after-operations
🏷️ Tags
#greedy #array #hash_table #math
🟡2598.smallest-missing-non-negative-integer-after-operations
🏷️ Tags
#greedy #array #hash_table #math
Telegraph
smallest-missing-non-negative-integer-after-operations
给你一个下标从 0 开始的整数数组 nums 和一个整数 value 。 在一步操作中,你可以对 nums 中的任一元素加上或减去 value 。
leetcode.com 2025-10-16
🟡2598.smallest-missing-non-negative-integer-after-operations
🏷️ Tags
#greedy #array #hash_table #math
🟡2598.smallest-missing-non-negative-integer-after-operations
🏷️ Tags
#greedy #array #hash_table #math
Telegraph
smallest-missing-non-negative-integer-after-operations
You are given a 0-indexed integer array nums and an integer value. In one operation, you can add or subtract value from any element of nums.
leetcode.cn 2025-10-30
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
Telegraph
minimum-number-of-increments-on-subarrays-to-form-a-target-array
给你一个整数数组 target 和一个数组 initial ,initial 数组与 target 数组有同样的维度,且一开始全部为 0 。 请你返回从 initial 得到 target 的最少操作次数,每次操作需遵循以下规则:
leetcode.com 2025-10-30
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
Telegraph
minimum-number-of-increments-on-subarrays-to-form-a-target-array
You are given an integer array target. You have an integer array initial of the same size as target with all elements initially zeros. In one operation you can choose any subarray from initial and increment each value by one. Return the minimum number of…