Bluewolf interview question

Second assignment was pretty hard to implement.