1 2 3 4 5
I have an idea of how to write the optimized algorithm for star 1, but I don't feel like it. this code works. star 2 would require a generalized form of the solution to star 1, but, again, don't feel like it