leetcode.cn 2025-10-08
🟡2300.successful-pairs-of-spells-and-potions
🏷️ Tags
#array #two_pointers #binary_search #sorting
🟡2300.successful-pairs-of-spells-and-potions
🏷️ Tags
#array #two_pointers #binary_search #sorting
Telegraph
successful-pairs-of-spells-and-potions
给你两个正整数数组 spells 和 potions ,长度分别为 n 和 m ,其中 spells[i] 表示第 i 个咒语的能量强度,potions[j] 表示第 j 瓶药水的能量强度。 同时给你一个整数 success 。一个咒语和药水的能量强度 相乘 如果 大于等于 success ,那么它们视为一对 成功 的组合。 请你返回一个长度为 n 的整数数组 pairs,其中 pairs[i] 是能跟第 i 个咒语成功组合的 药水 数目。 示例 1: 输入:spells = [5,1,3], potions…
leetcode.com 2025-10-08
🟡2300.successful-pairs-of-spells-and-potions
🏷️ Tags
#array #two_pointers #binary_search #sorting
🟡2300.successful-pairs-of-spells-and-potions
🏷️ Tags
#array #two_pointers #binary_search #sorting
Telegraph
successful-pairs-of-spells-and-potions
You are given two positive integer arrays spells and potions, of length n and m respectively, where spells[i] represents the strength of the ith spell and potions[j] represents the strength of the jth potion. You are also given an integer success. A spell…
leetcode.cn 2025-10-09
🟡3494.find-the-minimum-amount-of-time-to-brew-potions
🏷️ Tags
#array #prefix_sum #simulation
🟡3494.find-the-minimum-amount-of-time-to-brew-potions
🏷️ Tags
#array #prefix_sum #simulation
Telegraph
find-the-minimum-amount-of-time-to-brew-potions
给你两个长度分别为 n 和 m 的整数数组 skill 和 mana 。
leetcode.com 2025-10-09
🟡3494.find-the-minimum-amount-of-time-to-brew-potions
🏷️ Tags
#array #prefix_sum #simulation
🟡3494.find-the-minimum-amount-of-time-to-brew-potions
🏷️ Tags
#array #prefix_sum #simulation
Telegraph
find-the-minimum-amount-of-time-to-brew-potions
You are given two integer arrays, skill and mana, of length n and m, respectively. In a laboratory, n wizards must brew m potions in order. Each potion has a mana capacity mana[j] and must pass through all the wizards sequentially to be brewed properly. The…
leetcode.cn 2025-10-11
🟡3186.maximum-total-damage-with-spell-casting
🏷️ Tags
#array #hash_table #two_pointers #binary_search #dynamic_programming #counting #sorting
🟡3186.maximum-total-damage-with-spell-casting
🏷️ Tags
#array #hash_table #two_pointers #binary_search #dynamic_programming #counting #sorting
Telegraph
maximum-total-damage-with-spell-casting
一个魔法师有许多不同的咒语。 给你一个数组 power ,其中每个元素表示一个咒语的伤害值,可能会有多个咒语有相同的伤害值。 已知魔法师使用伤害值为 power[i] 的咒语时,他们就 不能 使用伤害为 power[i] - 2 ,power[i] - 1 ,power[i] + 1 或者 power[i] + 2 的咒语。 每个咒语最多只能被使用 一次 。 请你返回这个魔法师可以达到的伤害值之和的 最大值 。 示例 1: 输入:power = [1,1,3,4] 输出:6 解释: 可以使用咒语 0,1,3,伤害值分别为…
leetcode.com 2025-10-11
🟡3186.maximum-total-damage-with-spell-casting
🏷️ Tags
#array #hash_table #two_pointers #binary_search #dynamic_programming #counting #sorting
🟡3186.maximum-total-damage-with-spell-casting
🏷️ Tags
#array #hash_table #two_pointers #binary_search #dynamic_programming #counting #sorting
Telegraph
maximum-total-damage-with-spell-casting
A magician has various spells. You are given an array power, where each element represents the damage of a spell. Multiple spells can have the same damage value. It is a known fact that if a magician decides to cast a spell with a damage of power[i], they…
leetcode.cn 2025-10-12
🔴3539.find-sum-of-array-product-of-magical-sequences
🏷️ Tags
#bit_manipulation #array #math #dynamic_programming #bitmask #combinatorics
🔴3539.find-sum-of-array-product-of-magical-sequences
🏷️ Tags
#bit_manipulation #array #math #dynamic_programming #bitmask #combinatorics
Telegraph
find-sum-of-array-product-of-magical-sequences
给你两个整数 M 和 K,和一个整数数组 nums。
leetcode.com 2025-10-12
🔴3539.find-sum-of-array-product-of-magical-sequences
🏷️ Tags
#bit_manipulation #array #math #dynamic_programming #bitmask #combinatorics
🔴3539.find-sum-of-array-product-of-magical-sequences
🏷️ Tags
#bit_manipulation #array #math #dynamic_programming #bitmask #combinatorics
Telegraph
find-sum-of-array-product-of-magical-sequences
You are given two integers, m and k, and an integer array nums.
leetcode.cn 2025-10-13
🟢2273.find-resultant-array-after-removing-anagrams
🏷️ Tags
#array #hash_table #string #sorting
🟢2273.find-resultant-array-after-removing-anagrams
🏷️ Tags
#array #hash_table #string #sorting
Telegraph
find-resultant-array-after-removing-anagrams
给你一个下标从 0 开始的字符串 words ,其中 words[i] 由小写英文字符组成。 在一步操作中,需要选出任一下标 i ,从 words 中 删除 words[i] 。其中下标 i 需要同时满足下述两个条件:
leetcode.com 2025-10-13
🟢2273.find-resultant-array-after-removing-anagrams
🏷️ Tags
#array #hash_table #string #sorting
🟢2273.find-resultant-array-after-removing-anagrams
🏷️ Tags
#array #hash_table #string #sorting
Telegraph
find-resultant-array-after-removing-anagrams
You are given a 0-indexed string array words, where words[i] consists of lowercase English letters. In one operation, select any index i such that 0 < i < words.length and words[i - 1] and words[i] are anagrams, and delete words[i] from words. Keep performing…
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-17
🔴3003.maximize-the-number-of-partitions-after-operations
🏷️ Tags
#bit_manipulation #string #dynamic_programming #bitmask
🔴3003.maximize-the-number-of-partitions-after-operations
🏷️ Tags
#bit_manipulation #string #dynamic_programming #bitmask
Telegraph
maximize-the-number-of-partitions-after-operations
给你一个下标从 0 开始的字符串 s 和一个整数 k。 你需要执行以下分割操作,直到字符串 s 变为 空:
leetcode.cn 2025-10-19
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
Telegraph
lexicographically-smallest-string-after-applying-operations
给你一个字符串 s 以及两个整数 a 和 b 。其中,字符串 s 的长度为偶数,且仅由数字 0 到 9 组成。 你可以在 s 上按任意顺序多次执行下面两个操作之一:
leetcode.com 2025-10-19
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
🟡1625.lexicographically-smallest-string-after-applying-operations
🏷️ Tags
#depth_first_search #breadth_first_search #string #enumeration
Telegraph
lexicographically-smallest-string-after-applying-operations
You are given a string s of even length consisting of digits from 0 to 9, and two integers a and b. You can apply either of the following two operations any number of times and in any order on s: