Count Substrings - TLE

I have been solving, Count Substrings for 2-3 Hours, I have improved my Running Time, but not able to solve in less than 1 sec. Here is my Solution Solution. Please Help me understand this! Thanks! :slight_smile:

TLE implies you need to improve running time of algorithm. I think you are using brute force or complete search. For the given time constraints it doesโ€™t work. Try others. Happy C0D1NG!

1 Like
//