I am getting time limit in this question. Kindly help, how to reduce it, i am not getting the solution by my own.
here is my code :
Help with the timelimit problem in class assignment question
you can take two array a[] and b[] for any i
such that 1<=i<=n a[i] will correspond to the count of i digit numbers ending with a
similarly b[i] will correspond to the count of i digit numbers ending with b
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.