Implemented a bit better recursive solution in CS to problem #2.