Add solution for problem number 3
Add solutions for problems 3 and 4