Solved problem 11
Corrected the solution based on the correct problem specification