leetcode.cn 2026-09-18
🔴1520.maximum-number-of-non-overlapping-substrings
🏷️ Tags
#greedy #hash_table #string #sorting
🔴1520.maximum-number-of-non-overlapping-substrings
🏷️ Tags
#greedy #hash_table #string #sorting
Telegraph
maximum-number-of-non-overlapping-substrings
给你一个只包含小写字母的字符串 s ,你需要找到 s 中最多数目的非空子字符串,满足如下条件:
leetcode.com 2026-09-18
🔴1520.maximum-number-of-non-overlapping-substrings
🏷️ Tags
#greedy #hash_table #string #sorting
🔴1520.maximum-number-of-non-overlapping-substrings
🏷️ Tags
#greedy #hash_table #string #sorting
Telegraph
maximum-number-of-non-overlapping-substrings
Given a string s of lowercase letters, you need to find the maximum number of non-empty substrings of s that meet the following conditions:
leetcode.cn 2026-09-23
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
Telegraph
minimum-operations-to-reduce-x-to-zero
给你一个整数数组 nums 和一个整数 x 。每一次操作时,你应当移除数组 nums 最左边或最右边的元素,然后从 x 中减去该元素的值。请注意,需要 修改 数组以供接下来的操作使用。 如果可以将 x 恰好 减到 0 ,返回 最小操作数 ;否则,返回 -1 。 示例 1: 输入:nums = [1,1,4,2,3], x = 5 输出:2 解释:最佳解决方案是移除后两个元素,将 x 减到 0 。 示例 2: 输入:nums = [5,6,7,8,9], x = 4 输出:-1 示例 3: 输入:nums…
leetcode.com 2026-09-23
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
Telegraph
minimum-operations-to-reduce-x-to-zero
You are given an integer array nums and an integer x. In one operation, you can either remove the leftmost or the rightmost element from the array nums and subtract its value from x. Note that this modifies the array for future operations. Return the minimum…
leetcode.com 2026-09-25
🔴1096.brace-expansion-ii
🏷️ Tags
#stack #breadth_first_search #hash_table #string #backtracking #sorting
🔴1096.brace-expansion-ii
🏷️ Tags
#stack #breadth_first_search #hash_table #string #backtracking #sorting
Telegraph
brace-expansion-ii
Under the grammar given below, strings can represent a set of lowercase words. Let R(expr) denote the set of words the expression represents. The grammar can best be understood through simple examples:
leetcode.com 2026-09-26
🟡1807.evaluate-the-bracket-pairs-of-a-string
🏷️ Tags
#array #hash_table #string
🟡1807.evaluate-the-bracket-pairs-of-a-string
🏷️ Tags
#array #hash_table #string
Telegraph
evaluate-the-bracket-pairs-of-a-string
You are given a string s that contains some bracket pairs, with each pair containing a non-empty key.
leetcode.cn 2026-09-27
🟡1190.reverse-substrings-between-each-pair-of-parentheses
🏷️ Tags
#stack #string #bracket_sequences
🟡1190.reverse-substrings-between-each-pair-of-parentheses
🏷️ Tags
#stack #string #bracket_sequences
Telegraph
reverse-substrings-between-each-pair-of-parentheses
给出一个字符串 s(仅含有小写英文字母和括号)。 请你按照从括号内到外的顺序,逐层反转每对匹配括号中的字符串,并返回最终的结果。 注意,您的结果中 不应 包含任何括号。 示例 1: 输入:s = "(abcd)" 输出:"dcba" 示例 2: 输入:s = "(u(love)i)" 输出:"iloveu" 解释:先反转子字符串 "love" ,然后反转整个字符串。 示例 3: 输入:s = "(ed(et(oc))el)" 输出:"leetcode" 解释:先反转子字符串 "oc" ,接着反转 "etco"…
leetcode.com 2026-09-27
🟡1190.reverse-substrings-between-each-pair-of-parentheses
🏷️ Tags
#stack #string #bracket_sequences
🟡1190.reverse-substrings-between-each-pair-of-parentheses
🏷️ Tags
#stack #string #bracket_sequences
Telegraph
reverse-substrings-between-each-pair-of-parentheses
You are given a string s that consists of lower case English letters and brackets. Reverse the strings in each pair of matching parentheses, starting from the innermost one. Your result should not contain any brackets. Example 1: Input: s = "(abcd)" Output:…