I tried to code the solution for the “Simple Enough” problem based on the concept showed in the hint video, but after submitting the same, I am getting wrong answer as well as run time error. I am unable to understand where I made a mistake as the code is showing correct output in the sample test case. I tried a few test cases on my own and it was also showing me correct output.
The code can be found at https://ide.codingblocks.com/s/271223
Wrong Answer in the solution
Hey here is code for reference ,dry run it you will get it:
func -> gives me size of final string
func2-> only goes in recursion where string length is in between l and r and c1 is counting 1 bit
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.