Hi, guys. I use DFS to find all shortest transformation. The code runs well with the test given by leetcode OJ less than 1s. I do not know why time limited error happens in OJ.
Could you give us the code? And do you mean BFS? DFS isn't really that fast at solving the shortest path problem.
LeetCode OJ runs all test case in once. For one specific test case, you may pass. But run all of them together, the total time cost might beyond the limit.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.