Connected Shapes: 0
This started from an interview question asking me to count groups of 1's in a text file of 0's and 1's.
Initiall I used the Depth First Search algorithm written in JavaScript using a Docker container with Node.js and that got me very curious about the efficiency of other algorithms
I created several node and python scripts also designed to be run in Docker and output the number of seperate groups of 1's found, the duration of the execution, and the memory used.
From there I thought it would be really cool to actually see the traversal through this grid of numbers.
This is still a work in progress and it's not really what I initially envisioned, but it does at least provide an animation of the shapes being found.
The Expected number of shapes would be 2. The 1's are only considered connected if they are above, below, left, or right. Diagonals are not counted.
When provided a text file that contains the following (this is data_test_1.txt in the file dropdown):
The Expected number of shapes would be 2.
When provided a text file that contains the following (this is data_test_2.txt in the file dropdown):
The Expected number of shapes would be 3.