Leetcode 33 Solution