题目
原题页面:https://leetcode.com/problems/valid-number/
题目类型:Math, String
难度评价:hard
类似题目:(E) String to Integer (atoi)
Validate if a given string is numeric.
Some examples:
"0"=>true
" 0.1 "=>true
"abc"=>false
"1 a"=>false
"2e10"=>trueNote: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one.
分析
有穷自动机DFA。话说这题用NFA可以解吗?NFA的使用局限是什么?
代码
1 | class Solution: |
