Create Swift solution for problem 1