Leetcode Problem 1 Solution In Mg