Prime Number of Set Bits in Binary Representation

Asked at Palo Alto Networks · Coding & Leetcode-style Questions · Difficulty: Easy

Given two integers `left` and `right`, count how many integers in the inclusive range `[left, right]` have a prime number of set bits in their binary representation.

Loading the problem…