Incredible hulk

i am not able to understand what does this question want to ask?

You will be given a number n. You have to reach that number by taking some steps. But you can take steps only in powers of 2, like 1, 2, 4, 8, etc.
You have to answer the minimum number of steps required for you to reach the number n, by taking such steps.
n = 3, 2^0 + 2^1 = 3, so ans = 2
n = 4, 2^2 = 4, so ans = 1
n = 5, 2^0 + 2^2 = 5, so ans = 2

Basically, here you just have to count the number of set bits. That itself will be the answer

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.