Avoidance

I’m solving a variation of the Knight’s Tour Problem [1] with a little home coding project. I know the best way to solve this problem is a recursive function call. I also know the problem I’m trying to solve has three times the number of possibles at each stop. It’s a damn hairy recursive function.

So I spent several hours trying to solve it non-recursively.

You know what’s hairier than a hairy recursive function? Trying to avoid writing that hairy recursive function. A lesson I keep learning over and over.

[1] https://en.wikipedia.org/wiki/Knight%27s_tour

2 thoughts on “Avoidance

Comments are closed.