leetcode.com 2026-07-18
🟢1979.find-greatest-common-divisor-of-array
🏷️ Tags
#array #math #number_theory
🟢1979.find-greatest-common-divisor-of-array
🏷️ Tags
#array #math #number_theory
Telegraph
find-greatest-common-divisor-of-array
Given an integer array nums, return the greatest common divisor of the smallest number and largest number in nums. The greatest common divisor of two numbers is the largest positive integer that evenly divides both numbers. Example 1: Input: nums = [2,5…
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: