Just a leetcode implementation in swift