r/ProgrammerHumor •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

615 comments sorted by

View all comments

Show parent comment

1

u/arobie1992 Jun 11 '23

Per what one of my professors told me, you record your starting position, follow the wall, and if you reach where you started without finding the exit, you switch walls and try again. It's not foolproof and you need to make adjustments for the specific scenario, but the gist is when you know you're in a loop, try a different route and do the same thing.

1

u/SansFinalGuardian Jun 11 '23

that makes sense.