DEV Community

Zach
Zach

Posted on

Creative Approaches in Problem Solving

While working on the nQueens problem, my partner and I found ourselves needing to perform a diagonal traversal of a matrix. We thought of a few solutions and waited until some other preliminary steps were completed before implementing them.

Along the way, some confounding bugs led us to the help desk where we were alerted to how the test suite checked for diagonals. It's a nice solution, and I found it really creative.

When the time comes to apply that same trick or something close to it on my next problem, I hope I recognize the opportunity.

Alt Text
Alt Text
Alt Text
Alt Text
Alt Text
Alt Text

Top comments (0)