Amazon Interview Question

Convert a string to a number and handle all edge cases