Add Swift solution to problem 2