Adding solutions for problems 12, 13 and 14

Adding new solutions + tests, will need optimisation later.