We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9430a95 commit 266c427Copy full SHA for 266c427
lcof/面试题20. 表示数值的字符串/README.md
@@ -111,7 +111,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcof/%E9%9D%A2%E8%AF%95%E9
111
112
遍历 $s[i,..j]$ 范围内的每个字符,根据字符的类型进行分类讨论:
113
114
-- 如果当前字符是 `+` 或者 `-`,那么该字符的前一个字符必须是 `e` 或者 `E`,或者空格,否则返回 `false`。
+- 如果当前字符是 `+` 或者 `-`,那么该字符必须是第一个有效字符(即空格后的第一个非空字符),或者该字符的前一个字符必须是 `e` 或者 `E`,否则返回 `false`。
115
- 如果当前字符是数字,那么我们将 `digit` 置为 `true`。
116
- 如果当前字符是 `.`,那么该字符之前不能出现过 `.` 或者 `e`/`E`,否则返回 `false`,否则我们将 `dot` 置为 `true`。
117
- 如果当前字符是 `e` 或者 `E`,那么该字符之前不能出现过 `e`/`E`,并且必须出现过数字,否则返回 `false`,否则我们将 `e` 置为 `true`,并且将 `digit` 置为 `false`,表示 `e` 之后必须出现数字。
0 commit comments