This could probably be more efficient using a known algorithm, and it could definitely require more tests, but is good enough for now.
This could probably be more efficient using a known algorithm, and it could definitely require more tests, but is good enough for now.