Added solution to problem 2.

Signed-off-by: Andrew Coomes <ajc@ajcdrift.com>