Plus One Leetcode Problem 9