Added the solution for the 1st problem