Grid backtracking
medium 25 minGrid backtracking is depth-first search on a 2D board where the visited mark belongs to the current path: mark a cell on the way in, explore its neighbours, unmark it on the way out so other paths can use it.
Grid backtracking is depth-first search on a 2D board where the visited mark belongs to the current path: mark a cell on the way in, explore its neighbours, unmark it on the way out so other paths can use it.