Validate if a given string is numeric.
Some examples:
“0” => true
“ 0.1 “ => true
“abc” => false
“1 a” => false
“2e10” => true
Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one.
第一次看到这道题的时候我的表情是这样的 →
主要考的应该是归纳能力吧,虽然好像有很多情况的样子,但好好列出来应该也是没问题的吧?
too simple too naive