Greetings.
I have an 2-D array of size [N][N] which will represent a rectangular area / map with N rows and N columns.
Let's say I pick the middle as starting point (or anywhere else), I want to walk through all elements with the constraint of moving only X times before having to reset back to starting point. I then can walk through the path I've went to, but that will waste a turn.
I'm just wondering if there is a specific algorithm for this problem so I can compare with my current way of doing which just stores the moves I already did. (quite messy tbh)
Thanks in advance.