leetcode.cn 2026-02-21
🟢762.prime-number-of-set-bits-in-binary-representation
🏷️ Tags
#bit_manipulation #math
🟢762.prime-number-of-set-bits-in-binary-representation
🏷️ Tags
#bit_manipulation #math
Telegraph
prime-number-of-set-bits-in-binary-representation
给你两个整数 left 和 right ,在闭区间 [left, right] 范围内,统计并返回 计算置位位数为质数 的整数个数。 计算置位位数 就是二进制表示中 1 的个数。
leetcode.com 2026-02-21
🟢762.prime-number-of-set-bits-in-binary-representation
🏷️ Tags
#bit_manipulation #math
🟢762.prime-number-of-set-bits-in-binary-representation
🏷️ Tags
#bit_manipulation #math
Telegraph
prime-number-of-set-bits-in-binary-representation
Given two integers left and right, return the count of numbers in the inclusive range [left, right] having a prime number of set bits in their binary representation. Recall that the number of set bits an integer has is the number of 1's present when written…
leetcode.cn 2026-02-23
🟡1461.check-if-a-string-contains-all-binary-codes-of-size-k
🏷️ Tags
#bit_manipulation #hash_table #string #hash_function #rolling_hash
🟡1461.check-if-a-string-contains-all-binary-codes-of-size-k
🏷️ Tags
#bit_manipulation #hash_table #string #hash_function #rolling_hash
Telegraph
check-if-a-string-contains-all-binary-codes-of-size-k
给你一个二进制字符串 s 和一个整数 k 。如果所有长度为 k 的二进制字符串都是 s 的子串,请返回 true ,否则请返回 false 。 示例 1: 输入:s = "00110110", k = 2 输出:true 解释:长度为 2 的二进制串包括 "00","01","10" 和 "11"。它们分别是 s 中下标为 0,1,3,2 开始的长度为 2 的子串。 示例 2: 输入:s = "0110", k = 1 输出:true 解释:长度为 1 的二进制串包括 "0" 和 "1",显然它们都是…
leetcode.com 2026-02-23
🟡1461.check-if-a-string-contains-all-binary-codes-of-size-k
🏷️ Tags
#bit_manipulation #hash_table #string #hash_function #rolling_hash
🟡1461.check-if-a-string-contains-all-binary-codes-of-size-k
🏷️ Tags
#bit_manipulation #hash_table #string #hash_function #rolling_hash
Telegraph
check-if-a-string-contains-all-binary-codes-of-size-k
Given a binary string s and an integer k, return true if every binary code of length k is a substring of s. Otherwise, return false. Example 1: Input: s = "00110110", k = 2 Output: true Explanation: The binary codes of length 2 are "00", "01", "10" and…
leetcode.cn 2026-02-24
🟢1022.sum-of-root-to-leaf-binary-numbers
🏷️ Tags
#tree #depth_first_search #binary_tree
🟢1022.sum-of-root-to-leaf-binary-numbers
🏷️ Tags
#tree #depth_first_search #binary_tree
Telegraph
sum-of-root-to-leaf-binary-numbers
给出一棵二叉树,其上每个结点的值都是 0 或 1 。每一条从根到叶的路径都代表一个从最高有效位开始的二进制数。