We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
But if you backtrack, you have to revert numCrossJunctions to what it was? My solution was to have a Queue of paths (which is a point plus the number of interesections to reach this point), and if there is more than 1 direction, then add both new points to the queue.
Do you have to keep track of going back to the point you came from? So I also marked a point as visited, but not 100% sure if this is necessary.
Count Luck
You are viewing a single comment's thread. Return to all comments →
But if you backtrack, you have to revert numCrossJunctions to what it was? My solution was to have a Queue of paths (which is a point plus the number of interesections to reach this point), and if there is more than 1 direction, then add both new points to the queue.
Do you have to keep track of going back to the point you came from? So I also marked a point as visited, but not 100% sure if this is necessary.