how can i reduce the time complexity of the code?
The link for the code is given below:
TLE on submission of code
add this condition in the starting of the function
if (a.length() != b.length()) {
return false;
}
the code you shared has a lot of minor syntax errors, please fix those too
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.