I reversed the direction of BFS, i.e., I searched from endWord to beginWord and then it got accepted. When I change it back, I get TLE.
Same. There are probably more valid words closer to beginWord than to endWord, resulting in a more focused BFS starting from endWord.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.