Sometimes, I think so much to come up with an algorithm, then code it well only to find out that it gives a TLE.
How can we estimate whether an algorithm with so-and-so complexity fits well with the input constraints, before starting the coding ?
For eg:
if input is of length 100000 or 10000
and I just want to know, if an O(n^3) solution gives TLE or not.
Generally, the problem states the time to be 1 or 2 seconds.
So, with this kind of information, can we do any estimates on the number of seconds it takes for a large input and get a sense about its TLE outcome before itself without coding and then testing it with the judge ? Please help...