Skip to content

Commit 8fcaa42

Browse files
author
Shuo
committed
A: new
1 parent 0241653 commit 8fcaa42

File tree

237 files changed

+2919
-1825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+2919
-1825
lines changed

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,23 @@ LeetCode Problems' Solutions
7878

7979
| # | Title | Solution | Difficulty |
8080
| :-: | - | - | :-: |
81+
| <span id="1857">1857</span> | [Largest Color Value in a Directed Graph](https://leetcode.com/problems/largest-color-value-in-a-directed-graph "有向图中最大颜色值") | [Go](problems/largest-color-value-in-a-directed-graph) | Hard |
82+
| <span id="1856">1856</span> | [Maximum Subarray Min-Product](https://leetcode.com/problems/maximum-subarray-min-product "子数组最小乘积的最大值") | [Go](problems/maximum-subarray-min-product) | Medium |
83+
| <span id="1855">1855</span> | [Maximum Distance Between a Pair of Values](https://leetcode.com/problems/maximum-distance-between-a-pair-of-values "下标对中的最大距离") | [Go](problems/maximum-distance-between-a-pair-of-values) | Medium |
84+
| <span id="1854">1854</span> | [Maximum Population Year](https://leetcode.com/problems/maximum-population-year "人口最多的年份") | [Go](problems/maximum-population-year) | Easy |
85+
| <span id="1853">1853</span> | [Convert Date Format](https://leetcode.com/problems/convert-date-format) 🔒 | [MySQL](problems/convert-date-format) | Easy |
86+
| <span id="1852">1852</span> | [Distinct Numbers in Each Subarray](https://leetcode.com/problems/distinct-numbers-in-each-subarray) 🔒 | [Go](problems/distinct-numbers-in-each-subarray) | Medium |
87+
| <span id="1851">1851</span> | [Minimum Interval to Include Each Query](https://leetcode.com/problems/minimum-interval-to-include-each-query "包含每个查询的最小区间") | [Go](problems/minimum-interval-to-include-each-query) | Hard |
88+
| <span id="1850">1850</span> | [Minimum Adjacent Swaps to Reach the Kth Smallest Number](https://leetcode.com/problems/minimum-adjacent-swaps-to-reach-the-kth-smallest-number "邻位交换的最小次数") | [Go](problems/minimum-adjacent-swaps-to-reach-the-kth-smallest-number) | Medium |
89+
| <span id="1849">1849</span> | [Splitting a String Into Descending Consecutive Values](https://leetcode.com/problems/splitting-a-string-into-descending-consecutive-values "将字符串拆分为递减的连续值") | [Go](problems/splitting-a-string-into-descending-consecutive-values) | Medium |
90+
| <span id="1848">1848</span> | [Minimum Distance to the Target Element](https://leetcode.com/problems/minimum-distance-to-the-target-element "到目标元素的最小距离") | [Go](problems/minimum-distance-to-the-target-element) | Easy |
91+
| <span id="1847">1847</span> | [Closest Room](https://leetcode.com/problems/closest-room "最近的房间") | [Go](problems/closest-room) | Hard |
92+
| <span id="1846">1846</span> | [Maximum Element After Decreasing and Rearranging](https://leetcode.com/problems/maximum-element-after-decreasing-and-rearranging "减小和重新排列数组后的最大元素") | [Go](problems/maximum-element-after-decreasing-and-rearranging) | Medium |
93+
| <span id="1845">1845</span> | [Seat Reservation Manager](https://leetcode.com/problems/seat-reservation-manager "座位预约管理系统") | [Go](problems/seat-reservation-manager) | Medium |
94+
| <span id="1844">1844</span> | [Replace All Digits with Characters](https://leetcode.com/problems/replace-all-digits-with-characters "将所有数字用字符替换") | [Go](problems/replace-all-digits-with-characters) | Easy |
95+
| <span id="1843">1843</span> | [Suspicious Bank Accounts](https://leetcode.com/problems/suspicious-bank-accounts) 🔒 | [MySQL](problems/suspicious-bank-accounts) | Medium |
96+
| <span id="1842">1842</span> | [Next Palindrome Using Same Digits](https://leetcode.com/problems/next-palindrome-using-same-digits) 🔒 | [Go](problems/next-palindrome-using-same-digits) | Hard |
97+
| <span id="1841">1841</span> | [League Statistics](https://leetcode.com/problems/league-statistics) 🔒 | [MySQL](problems/league-statistics) | Medium |
8198
| <span id="1840">1840</span> | [Maximum Building Height](https://leetcode.com/problems/maximum-building-height "最高建筑高度") | [Go](problems/maximum-building-height) | Hard |
8299
| <span id="1839">1839</span> | [Longest Substring Of All Vowels in Order](https://leetcode.com/problems/longest-substring-of-all-vowels-in-order "所有元音按顺序排布的最长子字符串") | [Go](problems/longest-substring-of-all-vowels-in-order) | Medium |
83100
| <span id="1838">1838</span> | [Frequency of the Most Frequent Element](https://leetcode.com/problems/frequency-of-the-most-frequent-element "最高频元素的频数") | [Go](problems/frequency-of-the-most-frequent-element) | Medium |
@@ -124,7 +141,7 @@ LeetCode Problems' Solutions
124141
| <span id="1797">1797</span> | [Design Authentication Manager](https://leetcode.com/problems/design-authentication-manager "设计一个验证系统") | [Go](problems/design-authentication-manager) | Medium |
125142
| <span id="1796">1796</span> | [Second Largest Digit in a String](https://leetcode.com/problems/second-largest-digit-in-a-string "字符串中第二大的数字") | [Go](problems/second-largest-digit-in-a-string) | Easy |
126143
| <span id="1795">1795</span> | [Rearrange Products Table](https://leetcode.com/problems/rearrange-products-table) 🔒 | [MySQL](problems/rearrange-products-table) | Easy |
127-
| <span id="1794">1794</span> | [Count Pairs of Equal Substrings With Minimum Difference](https://leetcode.com/problems/count-pairs-of-equal-substrings-with-minimum-difference) 🔒 | [Go](problems/count-pairs-of-equal-substrings-with-minimum-difference) | Medium |
144+
| <span id="1794">1794</span> | [Count Pairs of Equal Substrings With Minimum Difference](https://leetcode.com/problems/count-pairs-of-equal-substrings-with-minimum-difference "统计距离最小的子串对个数") 🔒 | [Go](problems/count-pairs-of-equal-substrings-with-minimum-difference) | Medium |
128145
| <span id="1793">1793</span> | [Maximum Score of a Good Subarray](https://leetcode.com/problems/maximum-score-of-a-good-subarray "好子数组的最大分数") | [Go](problems/maximum-score-of-a-good-subarray) | Hard |
129146
| <span id="1792">1792</span> | [Maximum Average Pass Ratio](https://leetcode.com/problems/maximum-average-pass-ratio "最大平均通过率") | [Go](problems/maximum-average-pass-ratio) | Medium |
130147
| <span id="1791">1791</span> | [Find Center of Star Graph](https://leetcode.com/problems/find-center-of-star-graph "找出星型图的中心节点") | [Go](problems/find-center-of-star-graph) | Medium |

problems/2-keys-keyboard/README.md

+23-21
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,40 @@
1111

1212
## [650. 2 Keys Keyboard (Medium)](https://leetcode.com/problems/2-keys-keyboard "只有两个键的键盘")
1313

14-
<p>Initially on a notepad only one character &#39;A&#39; is present. You can perform two operations on this notepad for each step:</p>
14+
<p>There is only one character <code>&#39;A&#39;</code> on the screen of a notepad. You can perform two operations on this notepad for each step:</p>
1515

16-
<ol>
17-
<li><code>Copy All</code>: You can copy all the characters present on the notepad (partial copy is not allowed).</li>
18-
<li><code>Paste</code>: You can paste the characters which are copied <b>last time</b>.</li>
19-
</ol>
16+
<ul>
17+
<li>Copy All: You can copy all the characters present on the screen (a partial copy is not allowed).</li>
18+
<li>Paste: You can paste the characters which are copied last time.</li>
19+
</ul>
20+
21+
<p>Given an integer <code>n</code>, return <em>the minimum number of operations to get the character</em> <code>&#39;A&#39;</code> <em>exactly</em> <code>n</code> <em>times on the screen</em>.</p>
2022

2123
<p>&nbsp;</p>
24+
<p><strong>Example 1:</strong></p>
2225

23-
<p>Given a number <code>n</code>. You have to get <b>exactly</b> <code>n</code> &#39;A&#39; on the notepad by performing the minimum number of steps permitted. Output the minimum number of steps to get <code>n</code> &#39;A&#39;.</p>
26+
<pre>
27+
<strong>Input:</strong> n = 3
28+
<strong>Output:</strong> 3
29+
<strong>Explanation:</strong> Intitally, we have one character &#39;A&#39;.
30+
In step 1, we use Copy All operation.
31+
In step 2, we use Paste operation to get &#39;AA&#39;.
32+
In step 3, we use Paste operation to get &#39;AAA&#39;.
33+
</pre>
2434

25-
<p><b>Example 1:</b></p>
35+
<p><strong>Example 2:</strong></p>
2636

2737
<pre>
28-
<b>Input:</b> 3
29-
<b>Output:</b> 3
30-
<b>Explanation:</b>
31-
Intitally, we have one character &#39;A&#39;.
32-
In step 1, we use <b>Copy All</b> operation.
33-
In step 2, we use <b>Paste</b> operation to get &#39;AA&#39;.
34-
In step 3, we use <b>Paste</b> operation to get &#39;AAA&#39;.
38+
<strong>Input:</strong> n = 1
39+
<strong>Output:</strong> 0
3540
</pre>
3641

3742
<p>&nbsp;</p>
43+
<p><strong>Constraints:</strong></p>
3844

39-
<p><b>Note:</b></p>
40-
41-
<ol>
42-
<li>The <code>n</code> will be in the range [1, 1000].</li>
43-
</ol>
44-
45-
<p>&nbsp;</p>
45+
<ul>
46+
<li><code>1 &lt;= n &lt;= 1000</code></li>
47+
</ul>
4648

4749
### Related Topics
4850
[[Dynamic Programming](../../tag/dynamic-programming/README.md)]

problems/24-game/README.md

+41-21
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,53 @@
1111

1212
## [679. 24 Game (Hard)](https://leetcode.com/problems/24-game "24 点游戏")
1313

14-
<p>
15-
You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operated through <code>*</code>, <code>/</code>, <code>+</code>, <code>-</code>, <code>(</code>, <code>)</code> to get the value of 24.
16-
</p>
14+
<p>You are given an integer array <code>cards</code> of length <code>4</code>. You have four cards, each containing a number in the range <code>[1, 9]</code>. You should arrange the numbers on these cards in a mathematical expression using the operators <code>[&#39;+&#39;, &#39;-&#39;, &#39;*&#39;, &#39;/&#39;]</code> and the parentheses <code>&#39;(&#39;</code> and <code>&#39;)&#39;</code> to get the value 24.</p>
15+
16+
<p>You are restricted with the following rules:</p>
17+
18+
<ul>
19+
<li>The division operator <code>&#39;/&#39;</code> represents real division, not integer division.
20+
<ul>
21+
<li>For example, <code>4 / (1 - 2 / 3) = 4 / (1 / 3) = 12</code>.</li>
22+
</ul>
23+
</li>
24+
<li>Every operation done is between two numbers. In particular, we cannot use <code>&#39;-&#39;</code> as a unary operator.
25+
<ul>
26+
<li>For example, if <code>cards = [1, 1, 1, 1]</code>, the expression <code>&quot;-1 - 1 - 1 - 1&quot;</code> is <strong>not allowed</strong>.</li>
27+
</ul>
28+
</li>
29+
<li>You cannot concatenate numbers together
30+
<ul>
31+
<li>For example, if <code>cards = [1, 2, 1, 2]</code>, the expression <code>&quot;12 + 12&quot;</code> is not valid.</li>
32+
</ul>
33+
</li>
34+
</ul>
35+
36+
<p>Return <code>true</code> if you can get such expression that evaluates to <code>24</code>, and <code>false</code> otherwise.</p>
37+
38+
<p>&nbsp;</p>
39+
<p><strong>Example 1:</strong></p>
1740

18-
<p><b>Example 1:</b><br />
1941
<pre>
20-
<b>Input:</b> [4, 1, 8, 7]
21-
<b>Output:</b> True
22-
<b>Explanation:</b> (8-4) * (7-1) = 24
42+
<strong>Input:</strong> cards = [4,1,8,7]
43+
<strong>Output:</strong> true
44+
<strong>Explanation:</strong> (8-4) * (7-1) = 24
2345
</pre>
24-
</p>
2546

26-
<p><b>Example 2:</b><br />
47+
<p><strong>Example 2:</strong></p>
48+
2749
<pre>
28-
<b>Input:</b> [1, 2, 1, 2]
29-
<b>Output:</b> False
50+
<strong>Input:</strong> cards = [1,2,1,2]
51+
<strong>Output:</strong> false
3052
</pre>
31-
</p>
32-
33-
<p><b>Note:</b><br>
34-
<ol>
35-
<li>The division operator <code>/</code> represents real division, not integer division. For example, 4 / (1 - 2/3) = 12.</li>
36-
<li>Every operation done is between two numbers. In particular, we cannot use <code>-</code> as a unary operator. For example, with <code>[1, 1, 1, 1]</code> as input, the expression <code>-1 - 1 - 1 - 1</code> is not allowed.</li>
37-
<li>You cannot concatenate numbers together. For example, if the input is <code>[1, 2, 1, 2]</code>, we cannot write this as 12 + 12.</li>
38-
</ol>
39-
</p>
40-
</p>
53+
54+
<p>&nbsp;</p>
55+
<p><strong>Constraints:</strong></p>
56+
57+
<ul>
58+
<li><code>cards.length == 4</code></li>
59+
<li><code>1 &lt;= cards[i] &lt;= 9</code></li>
60+
</ul>
4161

4262
### Related Topics
4363
[[Depth-first Search](../../tag/depth-first-search/README.md)]

problems/4sum-ii/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<ul>
1717
<li><code>0 &lt;= i, j, k, l &lt; n</code></li>
18-
<li><code>nums1[i] + nums2[j] + nums3[k] + nums[l] == 0</code></li>
18+
<li><code>nums1[i] + nums2[j] + nums3[k] + nums4[l] == 0</code></li>
1919
</ul>
2020

2121
<p>&nbsp;</p>

problems/add-strings/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
<p>Given two non-negative integers, <code>num1</code> and <code>num2</code> represented as string, return <em>the sum of</em> <code>num1</code> <em>and</em> <code>num2</code> <em>as a string</em>.</p>
1515

16+
<p>You must solve the problem without using any built-in library for handling large integers (such as <code>BigInteger</code>). You must also not convert the inputs to integers directly.</p>
17+
1618
<p>&nbsp;</p>
1719
<p><strong>Example 1:</strong></p>
1820

@@ -44,9 +46,6 @@
4446
<li><code>num1</code> and <code>num2</code> don&#39;t have any leading zeros except for the zero itself.</li>
4547
</ul>
4648

47-
<p>&nbsp;</p>
48-
<p><strong>Follow up:</strong> Could you solve it without using any built-in <code>BigInteger</code> library or converting the inputs to integer directly?</p>
49-
5049
### Related Topics
5150
[[String](../../tag/string/README.md)]
5251

problems/advantage-shuffle/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@
1111

1212
## [870. Advantage Shuffle (Medium)](https://leetcode.com/problems/advantage-shuffle "优势洗牌")
1313

14-
<p>Given two arrays <code>A</code> and <code>B</code> of equal size, the <em>advantage of <code>A</code> with respect to <code>B</code></em> is the number of indices <code>i</code>&nbsp;for which <code>A[i] &gt; B[i]</code>.</p>
14+
<p>Given two arrays <code>nums1</code> and <code>nums2</code> of equal size, the <em>advantage of <code>nums1</code> with respect to <code>nums2</code></em> is the number of indices <code>i</code>&nbsp;for which <code>nums1[i] &gt; nums2[i]</code>.</p>
1515

16-
<p>Return <strong>any</strong> permutation of <code>A</code> that maximizes its advantage with respect to <code>B</code>.</p>
16+
<p>Return <strong>any</strong> permutation of <code>nums1</code> that maximizes its advantage with respect to <code>nums2</code>.</p>
1717

1818
<p>&nbsp;</p>
1919

2020
<div>
2121
<p><strong>Example 1:</strong></p>
2222

2323
<pre>
24-
<strong>Input: </strong>A = <span id="example-input-1-1">[2,7,11,15]</span>, B = <span id="example-input-1-2">[1,10,4,11]</span>
24+
<strong>Input: </strong>nums1 = <span id="example-input-1-1">[2,7,11,15]</span>, nums2 = <span id="example-input-1-2">[1,10,4,11]</span>
2525
<strong>Output: </strong><span id="example-output-1">[2,11,7,15]</span>
2626
</pre>
2727

2828
<div>
2929
<p><strong>Example 2:</strong></p>
3030

3131
<pre>
32-
<strong>Input: </strong>A = <span id="example-input-2-1">[12,24,8,32]</span>, B = <span id="example-input-2-2">[13,25,32,11]</span>
32+
<strong>Input: </strong>nums1 = <span id="example-input-2-1">[12,24,8,32]</span>, nums2 = <span id="example-input-2-2">[13,25,32,11]</span>
3333
<strong>Output: </strong><span id="example-output-2">[24,32,8,12]</span>
3434
</pre>
3535

@@ -38,9 +38,9 @@
3838
<p><strong>Note:</strong></p>
3939

4040
<ol>
41-
<li><code>1 &lt;= A.length = B.length &lt;= 10000</code></li>
42-
<li><code>0 &lt;= A[i] &lt;= 10^9</code></li>
43-
<li><code>0 &lt;= B[i] &lt;= 10^9</code></li>
41+
<li><code>1 &lt;= nums1.length = nums2.length &lt;= 10000</code></li>
42+
<li><code>0 &lt;= nums1[i] &lt;= 10<sup>9</sup></code></li>
43+
<li><code>0 &lt;= nums2[i] &lt;= 10<sup>9</sup></code></li>
4444
</ol>
4545
</div>
4646
</div>

problems/all-nodes-distance-k-in-binary-tree/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
## [863. All Nodes Distance K in Binary Tree (Medium)](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree "二叉树中所有距离为 K 的结点")
1313

14-
<p>We are given a binary tree (with root node&nbsp;<code>root</code>), a <code>target</code> node, and an integer value <code>K</code>.</p>
14+
<p>We are given a binary tree (with root node&nbsp;<code>root</code>), a <code>target</code> node, and an integer value <code>k</code>.</p>
1515

16-
<p>Return a list of the values of all&nbsp;nodes that have a distance <code>K</code> from the <code>target</code> node.&nbsp; The answer can be returned in any order.</p>
16+
<p>Return a list of the values of all&nbsp;nodes that have a distance <code>k</code> from the <code>target</code> node.&nbsp; The answer can be returned in any order.</p>
1717

1818
<p>&nbsp;</p>
1919

@@ -24,7 +24,7 @@
2424
<p><strong>Example 1:</strong></p>
2525

2626
<pre>
27-
<strong>Input: </strong>root = <span id="example-input-1-1">[3,5,1,6,2,0,8,null,null,7,4]</span>, target = <span id="example-input-1-2">5</span>, K = <span id="example-input-1-3">2</span>
27+
<strong>Input: </strong>root = <span id="example-input-1-1">[3,5,1,6,2,0,8,null,null,7,4]</span>, target = <span id="example-input-1-2">5</span>, k = <span id="example-input-1-3">2</span>
2828

2929
<strong>Output: </strong><span id="example-output-1">[7,4,1]</span>
3030

@@ -46,7 +46,7 @@ The descriptions of the inputs above are just serializations of these objects.
4646
<li>The given tree is non-empty.</li>
4747
<li>Each node in the tree has unique values&nbsp;<code>0 &lt;= node.val &lt;= 500</code>.</li>
4848
<li>The <code>target</code>&nbsp;node is a node in the tree.</li>
49-
<li><code>0 &lt;= K &lt;= 1000</code>.</li>
49+
<li><code>0 &lt;= k &lt;= 1000</code>.</li>
5050
</ol>
5151
</div>
5252

problems/ambiguous-coordinates/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,35 @@
1111

1212
## [816. Ambiguous Coordinates (Medium)](https://leetcode.com/problems/ambiguous-coordinates "模糊坐标")
1313

14-
<p>We had some 2-dimensional coordinates, like <code>&quot;(1, 3)&quot;</code> or <code>&quot;(2, 0.5)&quot;</code>.&nbsp; Then, we removed&nbsp;all commas, decimal points, and spaces, and ended up with the string&nbsp;<code>S</code>.&nbsp; Return a list of strings representing&nbsp;all possibilities for what our original coordinates could have been.</p>
14+
<p>We had some 2-dimensional coordinates, like <code>&quot;(1, 3)&quot;</code> or <code>&quot;(2, 0.5)&quot;</code>.&nbsp; Then, we removed&nbsp;all commas, decimal points, and spaces, and ended up with the string&nbsp;<code>s</code>.&nbsp; Return a list of strings representing&nbsp;all possibilities for what our original coordinates could have been.</p>
1515

1616
<p>Our original representation never had extraneous zeroes, so we never started with numbers like &quot;00&quot;, &quot;0.0&quot;, &quot;0.00&quot;, &quot;1.0&quot;, &quot;001&quot;, &quot;00.01&quot;, or any other number that can be represented with&nbsp;less digits.&nbsp; Also, a decimal point within a number never occurs without at least one digit occuring before it, so we never started with numbers like &quot;.1&quot;.</p>
1717

1818
<p>The final answer list can be returned in any order.&nbsp; Also note that all coordinates in the final answer&nbsp;have exactly one space between them (occurring after the comma.)</p>
1919

2020
<pre>
2121
<strong>Example 1:</strong>
22-
<strong>Input:</strong> &quot;(123)&quot;
22+
<strong>Input:</strong> s = &quot;(123)&quot;
2323
<strong>Output:</strong> [&quot;(1, 23)&quot;, &quot;(12, 3)&quot;, &quot;(1.2, 3)&quot;, &quot;(1, 2.3)&quot;]
2424
</pre>
2525

2626
<pre>
2727
<strong>Example 2:</strong>
28-
<strong>Input:</strong> &quot;(00011)&quot;
28+
<strong>Input:</strong> s = &quot;(00011)&quot;
2929
<strong>Output:</strong> &nbsp;[&quot;(0.001, 1)&quot;, &quot;(0, 0.011)&quot;]
3030
<strong>Explanation:</strong>
3131
0.0, 00, 0001 or 00.01 are not allowed.
3232
</pre>
3333

3434
<pre>
3535
<strong>Example 3:</strong>
36-
<strong>Input:</strong> &quot;(0123)&quot;
36+
<strong>Input:</strong> s = &quot;(0123)&quot;
3737
<strong>Output:</strong> [&quot;(0, 123)&quot;, &quot;(0, 12.3)&quot;, &quot;(0, 1.23)&quot;, &quot;(0.1, 23)&quot;, &quot;(0.1, 2.3)&quot;, &quot;(0.12, 3)&quot;]
3838
</pre>
3939

4040
<pre>
4141
<strong>Example 4:</strong>
42-
<strong>Input:</strong> &quot;(100)&quot;
42+
<strong>Input:</strong> s = &quot;(100)&quot;
4343
<strong>Output:</strong> [(10, 0)]
4444
<strong>Explanation:</strong>
4545
1.0 is not allowed.
@@ -50,8 +50,8 @@
5050
<p><strong>Note: </strong></p>
5151

5252
<ul>
53-
<li><code>4 &lt;= S.length &lt;= 12</code>.</li>
54-
<li><code>S[0]</code> = &quot;(&quot;, <code>S[S.length - 1]</code> = &quot;)&quot;, and the other elements in <code>S</code> are digits.</li>
53+
<li><code>4 &lt;= s.length &lt;= 12</code>.</li>
54+
<li><code>s[0]</code> = &quot;(&quot;, <code>s[s.length - 1]</code> = &quot;)&quot;, and the other elements in <code>s</code> are digits.</li>
5555
</ul>
5656

5757
<p>&nbsp;</p>

0 commit comments

Comments
 (0)