You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A **valid number** can be split up into these components (in order):
6
+
7
+
1. A **decimal number** or an **integer**.
8
+
2. (Optional) An `'e'` or `'E'`, followed by an **integer**.
9
+
10
+
A **decimal number** can be split up into these components (in order):
11
+
12
+
1. (Optional) A sign character (either `'+'` or `'-'`).
13
+
2. One of the following formats:
14
+
1. One or more digits, followed by a dot `'.'`.
15
+
2. One or more digits, followed by a dot `'.'`, followed by one or more digits.
16
+
3. A dot `'.'`, followed by one or more digits.
17
+
18
+
An **integer** can be split up into these components (in order):
19
+
20
+
1. (Optional) A sign character (either `'+'` or `'-'`).
21
+
2. One or more digits.
22
+
23
+
For example, all the following are valid numbers: `["2", "0089", "-0.1", "+3.14", "4.", "-.9", "2e10", "-90E3", "3e+7", "+6e-1", "53.5e93", "-123.456e789"]`, while the following are not valid numbers: `["abc", "1a", "1e", "e3", "99e2.5", "--6", "-+3", "95a54e53"]`.
24
+
25
+
Given a string `s`, return `true`_if_`s`_is a **valid number**_.
26
+
27
+
**Example 1:**
28
+
29
+
**Input:** s = "0"
30
+
31
+
**Output:** true
32
+
33
+
**Example 2:**
34
+
35
+
**Input:** s = "e"
36
+
37
+
**Output:** false
38
+
39
+
**Example 3:**
40
+
41
+
**Input:** s = "."
42
+
43
+
**Output:** false
44
+
45
+
**Constraints:**
46
+
47
+
*`1 <= s.length <= 20`
48
+
*`s` consists of only English letters (both uppercase and lowercase), digits (`0-9`), plus `'+'`, minus `'-'`, or dot `'.'`.
You are given a **large integer** represented as an integer array `digits`, where each `digits[i]` is the <code>i<sup>th</sup></code> digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading `0`'s.
6
+
7
+
Increment the large integer by one and return _the resulting array of digits_.
0 commit comments