The solutions of leetcode problems in Scala