Can you explain the incredible hunk problem?

i don’t get why for the input value 3 output is 2?

The solution for this is simply the number of set bits in the number. 3 in binary form is 011…Therefore number of set bits is 2.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.