Problem with my code, running fine but not getting accepted

Hey @Parmeet-Kalsi-1631789033630118 your approach is little tough to understand, refer this to find out mistake in your code

I had referred the video in the course only.
My code is giving the correct output always but it is not getting accepted.

What is it showing? Wrong answer, no result or TLE?