Added Solution to problem 24.