Houzz Interview Question

Write a function that takes a string as input and returns a number contained in the string. You need to support sign, floating point, and ignore spaces at the beginning or end of the string. Otherwise raise an exception. Important limitations: - Do not use any builtin functions for converting string to number. - Only one pass over the string is allowed - no multiple passes, so no “trim” operation is allowed, need to clean out spaces yourself.