Why TLE (Time Limit Exceeded)?
Contents
when I code the Leetcode problem [https://leetcode.com/problems/word-search/ 79 Word Search], I encounter the TLE problem:
my code for dfs is as following, which will result in TLE.
|
|
I tested another similar solution from [ this link], which will not cause TLE. Why?
Another Solution
|
|
作者: Yukun Chen
来源: http://www.person.psu.edu/~yzc147/blogs
链接: http://www.person.psu.edu/~yzc147/blogs/2017/04/23/tle-leetcode-word-search/
本文采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可