TIME LIMIT EXCEED ERROR | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

TIME LIMIT EXCEED ERROR

I am getting an error called TIME LIMIT EXCEED ERROR(TLE) when running an challenge on a website. Hence i got some test cases cleared... But now i know it can happen with all languages.. How can i avoid this? How to solve this? Python was the language i have used

29th May 2020, 1:27 PM
sid
sid - avatar
1 Resposta
0
It depends on the size of the input and time complexity of your program. Assuming you understand the big O notation, here are some guidelines: Input size - Required time complexity: n <= 10 - O(n!) n <= 20 - O(2āæ) n <= 500 - O(nĀ³) n <= 5000 - O(nĀ²) n <= 10ā¶ļøŽ - O(n log n) or O(n) large n - O(log n) or O(1)
29th May 2020, 1:59 PM
Bobby Fischer
Bobby Fischer - avatar