Translate a string to a float number

  • 0

    Given a string that only contains digit 0-9, dot(.), 'e' and negative sign '-', your task is converting the given string to a float number.

    for example:
    "0.0006" => 0.0006
    "6e-4" => 0.0006

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.