Added Solution to problem 1