leetcode.cn 2026-07-19
🟡1081.smallest-subsequence-of-distinct-characters
🏷️ Tags
#stack #greedy #string #monotonic_stack
🟡1081.smallest-subsequence-of-distinct-characters
🏷️ Tags
#stack #greedy #string #monotonic_stack
Telegraph
smallest-subsequence-of-distinct-characters
返回 s 字典序最小的子序列,该子序列包含 s 的所有不同字符,且只包含一次。 示例 1: 输入:s = "bcabc" 输出:"abc" 示例 2: 输入:s = "cbacdcbc" 输出:"acdb" 提示:
leetcode.com 2026-07-19
🟡1081.smallest-subsequence-of-distinct-characters
🏷️ Tags
#stack #greedy #string #monotonic_stack
🟡1081.smallest-subsequence-of-distinct-characters
🏷️ Tags
#stack #greedy #string #monotonic_stack
Telegraph
smallest-subsequence-of-distinct-characters
Given a string s, return the lexicographically smallest subsequence of s that contains all the distinct characters of s exactly once. Example 1: Input: s = "bcabc" Output: "abc" Example 2: Input: s = "cbacdcbc" Output: "acdb" Constraints:
leetcode.cn 2026-07-22
🔴3501.maximize-active-section-with-trade-ii
🏷️ Tags
#segment_tree #array #string #binary_search
🔴3501.maximize-active-section-with-trade-ii
🏷️ Tags
#segment_tree #array #string #binary_search
Telegraph
maximize-active-section-with-trade-ii
给你一个长度为 n 的二进制字符串 s ,其中:
leetcode.com 2026-07-22
🔴3501.maximize-active-section-with-trade-ii
🏷️ Tags
#segment_tree #array #string #binary_search
🔴3501.maximize-active-section-with-trade-ii
🏷️ Tags
#segment_tree #array #string #binary_search
Telegraph
maximize-active-section-with-trade-ii
You are given a binary string s of length n, where: