Kindly help me solve the TLE Error with a more optimized solution. I am getting the right answer for smaller test cases.
TLE Error on larger cases
Optimized Code
Kindly help me solve the TLE Error with a more optimized solution. I am getting the right answer for smaller test cases.
Optimized Code