A Blob is a shape in two-dimensional integer coordinate space where all cells have at least one adjoining cell to the right, left, top, or bottom that is also occupied. Given a 10x10 array of boolean values that represents a Blob uniformly selected at random from the set of all possible Blobs that could occupy that array, write a program that will determine the Blob boundaries. Optimize for finding the correct result, performing a minimum number of cell Boolean value reads, and elegance and clarity of the solution.
The raw input:
0000000000
0011100000
0011111000
0010001000
0011111000
0000101000
0000101000
0000111000
0000000000
0000000000
$ git clone https://github.com/tgrowden/blob-boundary.git
$ cd blob-boundary
$ yarn
$ yarn start