Earlier quoted context omitted.
!!(n & (n >> 1)), I assume.
Bonus points for the boolean sanitation! Now let me tell you about the candidate that wanted to turn the integer into a character string and then search the string for “11”...
After years of asking the same questions to intern candidates and to senior+ candidates, interns did consistently better. There are a lot of "experienced" but not very skilled people out there. They exist already inside ompanies too (Principle level checking in hundreds of lines of code with many classes and tests, purportedly to add logging support to something, but the code was ultimately a NOP as it did nothing) but even if it's impossible to put out the tire fire it's best not to contribute to it.