Check out example codes for "is TLE means my code is correct but taking more time to computr". It will help you in understanding the concepts better.

Code Example 1

TLE actually means that your program excedes the time limit for a 
particular test file. So, as soon as the time limit is exceeded the
program stops executing and you don’t know whether your program 
gives AC or not.
So, best practice is to optimize your program as much as possible.
Even, then it gives TLE, then go for different approach.

Learn ReactJs, React Native from