Can't Understand the issue with my solution in SimpleEnough

Hi,

Can’t Understand the issue with my solution in SimpleEnough Problem,
Some test cases are TLE, some showing wrong answer.

Thanks for help

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

Thanks, but please tell me why we are taking start range 1 instead of 0 to15 for N=9…?

l and r are given 1 indexed, so take s and e as 1 indexed also.