Solutions for Codility challanges