neetcode-gh / leetcode

Leetcode solutions
MIT License
5.58k stars 2.3k forks source link

Leetcode Question No. 79: Word Search Time Limit Exceeded #719

Open keith-loww opened 2 years ago

keith-loww commented 2 years ago

Question No. 79: Word Search, which can be found in the backtracking category, has a solution that exceeds the time limit. I checked by copying the code directly too, and it still threw the error.

dhruvmaindola227 commented 2 years ago

In which language? Java code is getting accepted in leetcode without issues. image

keith-loww commented 2 years ago

This issue is with the Python solution.

zemfoliveira commented 2 years ago

Can you please retest it to see if it's giving Time Limit Exceeded? On my end, the provided solution has a runtime of 7,000-8,500ms and the maximum runtime allowed is 9,650ms. image

As it can be seen below, these tests were done in Python and Python3. image

keith-loww commented 2 years ago

Here is the screenshot of the Leetcode page using the solution. image