Valid Number String Parsing
Asked at Meta · Coding Questions · Difficulty: Medium
Return `True` iff the string `s` is a valid number. A valid number is an optional sign `+`/`-`, followed by an integer part and/or a fractional part (a `.` with digits on at least one side, and at least one digit overall), optionally followed by an exponent: `e` or `E`, an optional sign, then one or more digits. Leading/trailing whitespace and any other characters make it invalid.
Loading the problem…