leetcode.cn 2025-03-07
🟡2597.the-number-of-beautiful-subsets
🏷️ Tags
#array #hash_table #math #dynamic_programming #backtracking #combinatorics #sorting
🟡2597.the-number-of-beautiful-subsets
🏷️ Tags
#array #hash_table #math #dynamic_programming #backtracking #combinatorics #sorting
Telegraph
the-number-of-beautiful-subsets
给你一个由正整数组成的数组 nums 和一个 正 整数 k 。 如果 nums 的子集中,任意两个整数的绝对差均不等于 k ,则认为该子数组是一个 美丽 子集。 返回数组 nums 中 非空 且 美丽 的子集数目。 nums 的子集定义为:可以经由 nums 删除某些元素(也可能不删除)得到的一个数组。只有在删除元素时选择的索引不同的情况下,两个子集才会被视作是不同的子集。 示例 1: 输入:nums = [2,4,6], k = 2 输出:4 解释:数组 nums 中的美丽子集有:[2], [4]…
leetcode.cn 2025-04-05
🟢1863.sum-of-all-subset-xor-totals
🏷️ Tags
#bit_manipulation #array #math #backtracking #combinatorics #enumeration
🟢1863.sum-of-all-subset-xor-totals
🏷️ Tags
#bit_manipulation #array #math #backtracking #combinatorics #enumeration
Telegraph
sum-of-all-subset-xor-totals
一个数组的 异或总和 定义为数组中所有元素按位 XOR 的结果;如果数组为 空 ,则异或总和为 0 。
leetcode.com 2025-04-05
🟢1863.sum-of-all-subset-xor-totals
🏷️ Tags
#bit_manipulation #array #math #backtracking #combinatorics #enumeration
🟢1863.sum-of-all-subset-xor-totals
🏷️ Tags
#bit_manipulation #array #math #backtracking #combinatorics #enumeration
Telegraph
sum-of-all-subset-xor-totals
The XOR total of an array is defined as the bitwise XOR of all its elements, or 0 if the array is empty.
leetcode.cn 2025-04-12
🔴3272.find-the-count-of-good-integers
🏷️ Tags
#hash_table #math #combinatorics #enumeration
🔴3272.find-the-count-of-good-integers
🏷️ Tags
#hash_table #math #combinatorics #enumeration
Telegraph
find-the-count-of-good-integers
给你两个 正 整数 n 和 k 。 如果一个整数 x 满足以下条件,那么它被称为 k 回文 整数 。
leetcode.com 2025-04-12
🔴3272.find-the-count-of-good-integers
🏷️ Tags
#hash_table #math #combinatorics #enumeration
🔴3272.find-the-count-of-good-integers
🏷️ Tags
#hash_table #math #combinatorics #enumeration
Telegraph
find-the-count-of-good-integers
You are given two positive integers n and k. An integer x is called k-palindromic if:
leetcode.cn 2025-04-22
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
Telegraph
count-the-number-of-ideal-arrays
给你两个整数 n 和 maxValue ,用于描述一个 理想数组 。 对于下标从 0 开始、长度为 n 的整数数组 arr ,如果满足以下条件,则认为该数组是一个 理想数组 :
leetcode.com 2025-04-22
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
Telegraph
count-the-number-of-ideal-arrays
You are given two integers n and maxValue, which are used to describe an ideal array. A 0-indexed integer array arr of length n is considered ideal if the following conditions hold:
leetcode.cn 2025-05-09
🔴3343.count-number-of-balanced-permutations
🏷️ Tags
#math #string #dynamic_programming #combinatorics
🔴3343.count-number-of-balanced-permutations
🏷️ Tags
#math #string #dynamic_programming #combinatorics
Telegraph
count-number-of-balanced-permutations
给你一个字符串 num 。如果一个数字字符串的奇数位下标的数字之和与偶数位下标的数字之和相等,那么我们称这个数字字符串是 平衡的 。