i am unable to apply condition that no of binary digits should be <=16.
Von neuman loves binary
Hi @Ridz030,
You needn’t worry about that. It means that at max the binary string will contain 16 digits (HINT: USE LONG FOR INPUT OF BINARY NUMBER). Hence the maximum possible binary string is 1111111111111111 (16 times 1)
Thanks!!So,if a user is entering a binary string greater than 16 its giving an exception.Is the code finds to be correct?
Hi @Ridz030,
There will be no input greater than 16 digits. You needn’t worry about that. Constraints are given to let the programmer know what should be the worst case time complexity and input data type (like int or long).
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.