It looks like the grid BFS everyone has written a hundred times, and the usual visited set is exactly what makes it wrong. The fix is one line and it is the whole point of the question.
Every answer, concept and course, all hands-on FDE Lab missions, Premium PDF guides and companion files, the full practice-test bank and work-sample downloads. Referral Premium excludes guide PDFs and their companion files.
6 months · One payment · No auto-renewal
Study alongside free video lessons.
