Replace question

In this question suppose the range from i to j is smaller then number for eg: i=1,j=3,and number to be replaced is 15 then how do we proceed

It will be depend on the problem statement of question and the constraints defined in it.
As you can see that for 15 we need 4 bits so its not possible for i=1 to j=3.

I hope i got your doubt correctly.

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.