Exercise:



Solution:



Some comments on the solutions I saw: