MaxProfit coding task - Learn to Code - Codility