Why my function is not returning on s[i]=='\0'

it is running more than i expected
code- https://ide.codingblocks.com/s/313312

@anubhavb11 if you function was not returning at s[i]==’\0’ then you would be getting TLE but you are not getting TLE means your function is returning at s[i]==’\0’. you are getting that long answer cause you are calling solve function recursively twice without any if else condition.