leetcode.com 2025-03-10
🟡3306.count-of-substrings-containing-every-vowel-and-k-consonants-ii
🏷️ Tags
#hash_table #string #sliding_window
🟡3306.count-of-substrings-containing-every-vowel-and-k-consonants-ii
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
count-of-substrings-containing-every-vowel-and-k-consonants-ii
You are given a string word and a non-negative integer k. Return the total number of substrings of word that contain every vowel ('a', 'e', 'i', 'o', and 'u') at least once and exactly k consonants. Example 1: Input: word = "aeioqq", k = 1 Output: 0 Explanation:…
👍1
leetcode.com 2025-03-11
🟡1358.number-of-substrings-containing-all-three-characters
🏷️ Tags
#hash_table #string #sliding_window
🟡1358.number-of-substrings-containing-all-three-characters
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
number-of-substrings-containing-all-three-characters
Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these characters a, b and c. Example 1: Input: s = "abcabc" Output: 10 Explanation: The substrings containing at least one…
leetcode.cn 2025-03-12
🟡3305.count-of-substrings-containing-every-vowel-and-k-consonants-i
🏷️ Tags
#hash_table #string #sliding_window
🟡3305.count-of-substrings-containing-every-vowel-and-k-consonants-i
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
count-of-substrings-containing-every-vowel-and-k-consonants-i
给你一个字符串 word 和一个 非负 整数 k。 返回 word 的 子字符串 中,每个元音字母('a'、'e'、'i'、'o'、'u')至少 出现一次,并且 恰好 包含 k 个辅音字母的子字符串的总数。 示例 1: 输入:word = "aeioqq", k = 1 输出:0 解释: 不存在包含所有元音字母的子字符串。 示例 2: 输入:word = "aeiou", k = 0 输出:1 解释: 唯一一个包含所有元音字母且不含辅音字母的子字符串是 word[0..4],即 "aeiou"。 示例…
leetcode.com 2025-03-12
🟢2529.maximum-count-of-positive-integer-and-negative-integer
🏷️ Tags
#array #binary_search #counting
🟢2529.maximum-count-of-positive-integer-and-negative-integer
🏷️ Tags
#array #binary_search #counting
Telegraph
maximum-count-of-positive-integer-and-negative-integer
Given an array nums sorted in non-decreasing order, return the maximum between the number of positive integers and the number of negative integers.
leetcode.cn 2025-03-13
🟡3306.count-of-substrings-containing-every-vowel-and-k-consonants-ii
🏷️ Tags
#hash_table #string #sliding_window
🟡3306.count-of-substrings-containing-every-vowel-and-k-consonants-ii
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
count-of-substrings-containing-every-vowel-and-k-consonants-ii
给你一个字符串 word 和一个 非负 整数 k。
leetcode.cn 2025-03-17
🟡1963.minimum-number-of-swaps-to-make-the-string-balanced
🏷️ Tags
#stack #greedy #two_pointers #string
🟡1963.minimum-number-of-swaps-to-make-the-string-balanced
🏷️ Tags
#stack #greedy #two_pointers #string
Telegraph
minimum-number-of-swaps-to-make-the-string-balanced
给你一个字符串 s ,下标从 0 开始 ,且长度为偶数 n 。字符串 恰好 由 n / 2 个开括号 '[' 和 n / 2 个闭括号 ']' 组成。 只有能满足下述所有条件的字符串才能称为 平衡字符串 :
leetcode.com 2025-03-17
🟢2206.divide-array-into-equal-pairs
🏷️ Tags
#bit_manipulation #array #hash_table #counting
🟢2206.divide-array-into-equal-pairs
🏷️ Tags
#bit_manipulation #array #hash_table #counting
Telegraph
divide-array-into-equal-pairs
You are given an integer array nums consisting of 2 * n integers. You need to divide nums into n pairs such that:
leetcode.cn 2025-03-19
🟡2610.convert-an-array-into-a-2d-array-with-conditions
🏷️ Tags
#array #hash_table
🟡2610.convert-an-array-into-a-2d-array-with-conditions
🏷️ Tags
#array #hash_table
Telegraph
convert-an-array-into-a-2d-array-with-conditions
给你一个整数数组 nums 。请你创建一个满足以下条件的二维数组:
leetcode.com 2025-03-19
🟡3191.minimum-operations-to-make-binary-array-elements-equal-to-one-i
🏷️ Tags
#bit_manipulation #queue #array #prefix_sum #sliding_window
🟡3191.minimum-operations-to-make-binary-array-elements-equal-to-one-i
🏷️ Tags
#bit_manipulation #queue #array #prefix_sum #sliding_window
Telegraph
minimum-operations-to-make-binary-array-elements-equal-to-one-i
You are given a binary array nums. You can do the following operation on the array any number of times (possibly zero):
leetcode.cn 2025-03-20
🔴2612.minimum-reverse-operations
🏷️ Tags
#breadth_first_search #array #ordered_set
🔴2612.minimum-reverse-operations
🏷️ Tags
#breadth_first_search #array #ordered_set
Telegraph
minimum-reverse-operations
给你一个整数 n 和一个在范围 [0, n - 1] 以内的整数 p ,它们表示一个长度为 n 且下标从 0 开始的数组 arr ,数组中除了下标为 p 处是 1 以外,其他所有数都是 0 。 同时给你一个整数数组 banned ,它包含数组中的一些位置。banned 中第 i 个位置表示 arr[banned[i]] = 0 ,题目保证 banned[i] != p 。 你可以对 arr 进行 若干次 操作。一次操作中,你选择大小为 k 的一个 子数组 ,并将它 翻转 。在任何一次翻转操作后,你都需要确保…