update solution for leetcode String to Integer