leetcode.com 2026-07-17
🔴3312.sorted-gcd-pair-queries
🏷️ Tags
#array #hash_table #math #binary_search #combinatorics #counting #number_theory #prefix_sum
🔴3312.sorted-gcd-pair-queries
🏷️ Tags
#array #hash_table #math #binary_search #combinatorics #counting #number_theory #prefix_sum
Telegraph
sorted-gcd-pair-queries
You are given an integer array nums of length n and an integer array queries. Let gcdPairs denote an array obtained by calculating the GCD of all possible pairs (nums[i], nums[j]), where 0 <= i < j < n, and then sorting these values in ascending order. For…
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:
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:
leetcode.cn 2026-07-24
🟡3514.number-of-unique-xor-triplets-ii
🏷️ Tags
#bit_manipulation #array #math #enumeration
🟡3514.number-of-unique-xor-triplets-ii
🏷️ Tags
#bit_manipulation #array #math #enumeration
Telegraph
number-of-unique-xor-triplets-ii
给你一个整数数组 nums 。