It is showing TLE

Hey!
How do I optimize my code here as two of the test cases are showing tle.

hello @varshita_04

ss

working fine on my side.

pls clear ur cache and then try to submit again

oh yes! clearing cache submitted my solution perfectly fine. thanks!!

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.