Search
⌘K

Leetcode 762. Prime Number of Set Bits in Binary Representation

Count how many integers in [left, right] have a prime number of 1-bits in their binary representation. Compute each number's popcount and check it against a small precomputed set of primes (up to the max bit-length).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.