Is String a Valid Number?


Given an input string, determine if a given string makes a valid number or not.


  • For simplicity, assume that white spaces are not present in the input.
  • In case the input string is empty, the function should return TRUE.


Level up your interview prep. Join Educative to access 70+ hands-on prep courses.