This repo solves the question below creating with Pygame animation. We found all possible ways to ending square and display it on the Pygame UI
You are given an m × n integer array grid where grid [i][j] could be:
- 1 representing the starting square. There is exactly one starting square.
- 2 representing the ending square. There is exactly one ending square.
- 0 representing empty squares we can walk over.
- -1 representing obstacles that we cannot walk over. Return the number of 4-directional walks from the starting square to the ending square, that walk over every non-obstacle square exactly once.
Ekran.Kaydi.2023-07-04.21.13.53.mov
Before running the main code, you can give specific 2D matrix.
python main.py
Feel free to contribute. I am working on creating a WebAssembly script that will enable displaying output in the browser. In next, I will add other path-finding and search algorithms with animations.