Added algorithm for exercise 4
Merge branch 'master' of github.com:rostgaard/02242