What measures can i take to not to get time limit exceed other then compressing my algorithm. Order…
About time limit exceed
That’s a language dependent question, but here are a few points:
- Use Fast Input/Output (Try googling same for the language you are using)
- Declare global containers, and clear them in loops rather than declaring a new container in each loop, or sending them as function arguments
- Use arrays/vectors over hash-maps if possible
what is meaning of global container…
A container (vector, set, map etc) which is declared globally, aka outside the scope of any function.
1 Like
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.