Skip to content

Commit

Permalink
feat: update lc problems (#2243)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme authored Jan 20, 2024
1 parent c22e956 commit 41aa731
Show file tree
Hide file tree
Showing 144 changed files with 841 additions and 789 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for (int i = 0; i < len; i++) {
<pre>
<strong>输入:</strong>nums = [0,0,1,1,1,1,2,3,3]
<strong>输出:</strong>7, nums = [0,0,1,1,2,3,3]
<strong>解释:</strong>函数应返回新长度 length = <strong><code>7</code></strong>, 并且原数组的前五个元素被修改为&nbsp;<strong><code>0, 0, 1, 1, 2, 3, 3</code></strong>。不需要考虑数组中超出新长度后面的元素。
<strong>解释:</strong>函数应返回新长度 length = <strong><code>7</code></strong>, 并且原数组的前七个元素被修改为&nbsp;<strong><code>0, 0, 1, 1, 2, 3, 3</code></strong>。不需要考虑数组中超出新长度后面的元素。
</pre>

<p>&nbsp;</p>
Expand Down
2 changes: 1 addition & 1 deletion solution/0100-0199/0139.Word Break/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<!-- 这里写题目描述 -->

<p>给你一个字符串 <code>s</code> 和一个字符串列表 <code>wordDict</code> 作为字典。请你判断是否可以利用字典中出现的单词拼接出 <code>s</code> 。</p>
<p>给你一个字符串 <code>s</code> 和一个字符串列表 <code>wordDict</code> 作为字典。如果可以利用字典中出现的一个或多个单词拼接出 <code>s</code>&nbsp;则返回 <code>true</code>。</p>

<p><strong>注意:</strong>不要求字典中出现的单词全部都使用,并且字典中的单词可以重复使用。</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<pre>
<strong>输入:</strong>nums = [4,5,6,7,0,1,2]
<strong>输出:</strong>0
<strong>解释:</strong>原数组为 [0,1,2,4,5,6,7] ,旋转 4 次得到输入数组。
<strong>解释:</strong>原数组为 [0,1,2,4,5,6,7] ,旋转 3 次得到输入数组。
</pre>

<p><strong>示例 3:</strong></p>
Expand Down
2 changes: 2 additions & 0 deletions solution/0300-0399/0320.Generalized Abbreviation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<ul>
<li>例如,<code>"abcde"</code> 可以缩写为:

<ul>
<li><code>"a3e"</code>(<code>"bcd"</code> 变为 <code>"3"</code> )</li>
<li><code>"1bcd1"</code>(<code>"a"</code> 和 <code>"e"</code> 都变为 <code>"1"</code>)<meta charset="UTF-8" /></li>
Expand All @@ -23,6 +24,7 @@
<li><meta charset="UTF-8" /><code>"22de"</code>&nbsp;(<code>"ab"</code> 变为&nbsp;<code>"2"</code>&nbsp;,&nbsp;<code>"bc"</code>&nbsp;变为&nbsp;<code>"2"</code>) &nbsp;是无效的,因为被选择的字符串是重叠的</li>
</ul>
</li>

</ul>

<p>给你一个字符串&nbsp;<code>word</code> ,返回&nbsp;<em>一个由</em>&nbsp;<code>word</code> 的<em>所有可能 <strong>广义缩写词</strong> 组成的列表</em>&nbsp;。按 <strong>任意顺序</strong> 返回答案。</p>
Expand Down
2 changes: 2 additions & 0 deletions solution/0300-0399/0320.Generalized Abbreviation/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ul>
<li>For example, <code>&quot;abcde&quot;</code> can be abbreviated into:

<ul>
<li><code>&quot;a3e&quot;</code> (<code>&quot;bcd&quot;</code> turned into <code>&quot;3&quot;</code>)</li>
<li><code>&quot;1bcd1&quot;</code> (<code>&quot;a&quot;</code> and <code>&quot;e&quot;</code> both turned into <code>&quot;1&quot;</code>)</li>
Expand All @@ -21,6 +22,7 @@
<li><code>&quot;22de&quot;</code> (<code>&quot;ab&quot;</code> turned into <code>&quot;2&quot;</code> and <code>&quot;bc&quot;</code> turned into <code>&quot;2&quot;</code>) is invalid as the substring chosen overlap.</li>
</ul>
</li>

</ul>

<p>Given a string <code>word</code>, return <em>a list of all the possible <strong>generalized abbreviations</strong> of</em> <code>word</code>. Return the answer in <strong>any order</strong>.</p>
Expand Down
28 changes: 14 additions & 14 deletions solution/0300-0399/0375.Guess Number Higher or Lower II/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@
<strong>输出:</strong>16
<strong>解释:</strong>制胜策略如下:
- 数字范围是 [1,10] 。你先猜测数字为 7 。
&nbsp; - 如果这是我选中的数字,你的总费用为 0 。否则,你需要支付 7 。
&nbsp; - 如果这是我选中的数字,你的总费用为 $0 。否则,你需要支付 $7 。
&nbsp; - 如果我的数字更大,则下一步需要猜测的数字范围是 [8,10] 。你可以猜测数字为 9 。
&nbsp; - 如果这是我选中的数字,你的总费用为 7 。否则,你需要支付 9 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 10 。你猜测数字为 10 并赢得游戏,总费用为 7 + 9 = 16 。
&nbsp; - 如果我的数字更小,那么这个数字一定是 8 。你猜测数字为 8 并赢得游戏,总费用为 7 + 9 = 16 。
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 。否则,你需要支付 $9 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 10 。你猜测数字为 10 并赢得游戏,总费用为 $7 + $9 = $16 。
&nbsp; - 如果我的数字更小,那么这个数字一定是 8 。你猜测数字为 8 并赢得游戏,总费用为 $7 + $9 = $16 。
&nbsp; - 如果我的数字更小,则下一步需要猜测的数字范围是 [1,6] 。你可以猜测数字为 3 。
&nbsp; - 如果这是我选中的数字,你的总费用为 7 。否则,你需要支付 3 。
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 。否则,你需要支付 $3 。
&nbsp; - 如果我的数字更大,则下一步需要猜测的数字范围是 [4,6] 。你可以猜测数字为 5 。
&nbsp; - 如果这是我选中的数字,你的总费用为 7 + 3 = 10 。否则,你需要支付 5 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 6 。你猜测数字为 6 并赢得游戏,总费用为 7 + 3 + 5 = 15 。
&nbsp; - 如果我的数字更小,那么这个数字一定是 4 。你猜测数字为 4 并赢得游戏,总费用为 7 + 3 + 5 = 15 。
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 + $3 = $10 。否则,你需要支付 $5 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 6 。你猜测数字为 6 并赢得游戏,总费用为 $7 + $3 + $5 = $15 。
&nbsp; - 如果我的数字更小,那么这个数字一定是 4 。你猜测数字为 4 并赢得游戏,总费用为 $7 + $3 + $5 = $15 。
&nbsp; - 如果我的数字更小,则下一步需要猜测的数字范围是 [1,2] 。你可以猜测数字为 1 。
&nbsp; - 如果这是我选中的数字,你的总费用为 7 + 3 = 10 。否则,你需要支付 1 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 7 + 3 + 1 = 11 。
在最糟糕的情况下,你需要支付 16 。因此,你只需要 16 就可以确保自己赢得游戏。
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 + $3 = $10 。否则,你需要支付 $1 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 $7 + $3 + $1 = $11 。
在最糟糕的情况下,你需要支付 $16 。因此,你只需要 $16 就可以确保自己赢得游戏。
</pre>

<p><strong>示例 2:</strong></p>
Expand All @@ -59,9 +59,9 @@
<strong>输出:</strong>1
<strong>解释:</strong>有两个可能的数字 1 和 2 。
- 你可以先猜 1 。
&nbsp; - 如果这是我选中的数字,你的总费用为 0 。否则,你需要支付 1 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 1 。
最糟糕的情况下,你需要支付 1 。
&nbsp; - 如果这是我选中的数字,你的总费用为 $0 。否则,你需要支付 $1 。
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 $1 。
最糟糕的情况下,你需要支付 $1 。
</pre>

<p>&nbsp;</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
<strong>Output:</strong> 16
<strong>Explanation:</strong> The winning strategy is as follows:
- The range is [1,10]. Guess 7.
&nbsp; - If this is my number, your total is 0. Otherwise, you pay 7.
&nbsp; - If this is my number, your total is $0. Otherwise, you pay $7.
&nbsp; - If my number is higher, the range is [8,10]. Guess 9.
&nbsp; - If this is my number, your total is 7. Otherwise, you pay 9.
&nbsp; - If my number is higher, it must be 10. Guess 10. Your total is 7 + 9 = 16.
&nbsp; - If my number is lower, it must be 8. Guess 8. Your total is 7 + 9 = 16.
&nbsp; - If this is my number, your total is $7. Otherwise, you pay $9.
&nbsp; - If my number is higher, it must be 10. Guess 10. Your total is $7 + $9 = $16.
&nbsp; - If my number is lower, it must be 8. Guess 8. Your total is $7 + $9 = $16.
&nbsp; - If my number is lower, the range is [1,6]. Guess 3.
&nbsp; - If this is my number, your total is 7. Otherwise, you pay 3.
&nbsp; - If this is my number, your total is $7. Otherwise, you pay $3.
&nbsp; - If my number is higher, the range is [4,6]. Guess 5.
&nbsp; - If this is my number, your total is 7 + 3 = 10. Otherwise, you pay 5.
&nbsp; - If my number is higher, it must be 6. Guess 6. Your total is 7 + 3 + 5 = 15.
&nbsp; - If my number is lower, it must be 4. Guess 4. Your total is 7 + 3 + 5 = 15.
&nbsp; - If this is my number, your total is $7 + $3 = $10. Otherwise, you pay $5.
&nbsp; - If my number is higher, it must be 6. Guess 6. Your total is $7 + $3 + $5 = $15.
&nbsp; - If my number is lower, it must be 4. Guess 4. Your total is $7 + $3 + $5 = $15.
&nbsp; - If my number is lower, the range is [1,2]. Guess 1.
&nbsp; - If this is my number, your total is 7 + 3 = 10. Otherwise, you pay 1.
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is 7 + 3 + 1 = 11.
The worst case in all these scenarios is that you pay 16. Hence, you only need 16 to guarantee a win.
&nbsp; - If this is my number, your total is $7 + $3 = $10. Otherwise, you pay $1.
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is $7 + $3 + $1 = $11.
The worst case in all these scenarios is that you pay $16. Hence, you only need $16 to guarantee a win.
</pre>

<p><strong class="example">Example 2:</strong></p>
Expand All @@ -56,9 +56,9 @@ The worst case in all these scenarios is that you pay 16. Hence, you only need 1
<strong>Output:</strong> 1
<strong>Explanation:</strong>&nbsp;There are two possible numbers, 1 and 2.
- Guess 1.
&nbsp; - If this is my number, your total is 0. Otherwise, you pay 1.
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is 1.
The worst case is that you pay 1.
&nbsp; - If this is my number, your total is $0. Otherwise, you pay $1.
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is $1.
The worst case is that you pay $1.
</pre>

<p>&nbsp;</p>
Expand Down
2 changes: 1 addition & 1 deletion solution/0400-0499/0447.Number of Boomerangs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<!-- 这里写题目描述 -->

<p>给定平面上<em>&nbsp;</em><code>n</code><em> </em>对 <strong>互不相同</strong> 的点&nbsp;<code>points</code> ,其中 <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> 。<strong>回旋镖</strong> 是由点&nbsp;<code>(i, j, k)</code> 表示的元组 ,其中&nbsp;<code>i</code>&nbsp;&nbsp;<code>j</code>&nbsp;之间的距离和&nbsp;<code>i</code>&nbsp;&nbsp;<code>k</code>&nbsp;之间的欧式距离相等(<strong>需要考虑元组的顺序</strong>)。</p>
<p>给定平面上<em>&nbsp;</em><code>n</code><em> </em>对 <strong>互不相同</strong> 的点&nbsp;<code>points</code> ,其中 <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> 。<strong>回旋镖</strong> 是由点&nbsp;<code>(i, j, k)</code> 表示的元组 ,其中&nbsp;<code>i</code>&nbsp;&nbsp;<code>j</code>&nbsp;之间的欧式距离和&nbsp;<code>i</code>&nbsp;&nbsp;<code>k</code>&nbsp;之间的欧式距离相等(<strong>需要考虑元组的顺序</strong>)。</p>

<p>返回平面上所有回旋镖的数量。</p>
&nbsp;
Expand Down
18 changes: 9 additions & 9 deletions solution/0400-0499/0465.Optimal Account Balancing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<!-- 这里写题目描述 -->

<p>给你一个表示交易的数组 <code>transactions</code> ,其中 <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> 表示 <code>ID = from<sub>i</sub></code> 的人给&nbsp;<code>ID = to<sub>i</sub></code> 的人共计 <code>amount<sub>i</sub> </code> 。</p>
<p>给你一个表示交易的数组 <code>transactions</code> ,其中 <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> 表示 <code>ID = from<sub>i</sub></code> 的人给&nbsp;<code>ID = to<sub>i</sub></code> 的人共计 <code>amount<sub>i</sub> $</code> 。</p>

<p>请你计算并返回还清所有债务的最小交易笔数。</p>

Expand All @@ -18,21 +18,21 @@
<strong>输入:</strong>transactions = [[0,1,10],[2,0,5]]
<strong>输出:</strong>2
<strong>解释:</strong>
#0 给 #1 10 。
#2 给 #0 5 。
需要进行两笔交易。一种结清债务的方式是 #1 给 #0 和 #2 各 5 。</pre>
#0 给 #1 $10 。
#2 给 #0 $5 。
需要进行两笔交易。一种结清债务的方式是 #1 给 #0 和 #2 各 $5 。</pre>

<p><strong class="example">示例 2:</strong></p>

<pre>
<strong>输入:</strong>transactions = [[0,1,10],[1,0,1],[1,2,5],[2,0,5]]
<strong>输出:</strong>1
<strong>解释:</strong>
#0 给 #1 10 。
#1 给 #0 1 。
#1 给 #2 5 。
#2 给 #0 5 。
因此,#1 只需要给 #0 4 ,所有的债务即可还清。
#0 给 #1 $10 。
#1 给 #0 $1 。
#1 给 #2 $5 。
#2 给 #0 $5 。
因此,#1 只需要给 #0 $4 ,所有的债务即可还清。
</pre>

<p>&nbsp;</p>
Expand Down
18 changes: 9 additions & 9 deletions solution/0400-0499/0465.Optimal Account Balancing/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Description

<p>You are given an array of transactions <code>transactions</code> where <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> indicates that the person with <code>ID = from<sub>i</sub></code> gave <code>amount<sub>i</sub> </code> to the person with <code>ID = to<sub>i</sub></code>.</p>
<p>You are given an array of transactions <code>transactions</code> where <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> indicates that the person with <code>ID = from<sub>i</sub></code> gave <code>amount<sub>i</sub> $</code> to the person with <code>ID = to<sub>i</sub></code>.</p>

<p>Return <em>the minimum number of transactions required to settle the debt</em>.</p>

Expand All @@ -15,9 +15,9 @@
<strong>Input:</strong> transactions = [[0,1,10],[2,0,5]]
<strong>Output:</strong> 2
<strong>Explanation:</strong>
Person #0 gave person #1 10.
Person #2 gave person #0 5.
Two transactions are needed. One way to settle the debt is person #1 pays person #0 and #2 5 each.
Person #0 gave person #1 $10.
Person #2 gave person #0 $5.
Two transactions are needed. One way to settle the debt is person #1 pays person #0 and #2 $5 each.
</pre>

<p><strong class="example">Example 2:</strong></p>
Expand All @@ -26,11 +26,11 @@ Two transactions are needed. One way to settle the debt is person #1 pays person
<strong>Input:</strong> transactions = [[0,1,10],[1,0,1],[1,2,5],[2,0,5]]
<strong>Output:</strong> 1
<strong>Explanation:</strong>
Person #0 gave person #1 10.
Person #1 gave person #0 1.
Person #1 gave person #2 5.
Person #2 gave person #0 5.
Therefore, person #1 only need to give person #0 4, and all debt is settled.
Person #0 gave person #1 $10.
Person #1 gave person #0 $1.
Person #1 gave person #2 $5.
Person #2 gave person #0 $5.
Therefore, person #1 only need to give person #0 $4, and all debt is settled.
</pre>

<p>&nbsp;</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [549. 二叉树中最长的连续序列](https://leetcode.cn/problems/binary-tree-longest-consecutive-sequence-ii)
# [549. 二叉树最长连续序列 II](https://leetcode.cn/problems/binary-tree-longest-consecutive-sequence-ii)

[English Version](/solution/0500-0599/0549.Binary%20Tree%20Longest%20Consecutive%20Sequence%20II/README_EN.md)

Expand Down
16 changes: 8 additions & 8 deletions solution/0600-0699/0638.Shopping Offers/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
<pre>
<strong>Input:</strong> price = [2,5], special = [[3,0,5],[1,2,10]], needs = [3,2]
<strong>Output:</strong> 14
<strong>Explanation:</strong> There are two kinds of items, A and B. Their prices are 2 and 5 respectively.
In special offer 1, you can pay 5 for 3A and 0B
In special offer 2, you can pay 10 for 1A and 2B.
You need to buy 3A and 2B, so you may pay 10 for 1A and 2B (special offer #2), and 4 for 2A.
<strong>Explanation:</strong> There are two kinds of items, A and B. Their prices are $2 and $5 respectively.
In special offer 1, you can pay $5 for 3A and 0B
In special offer 2, you can pay $10 for 1A and 2B.
You need to buy 3A and 2B, so you may pay $10 for 1A and 2B (special offer #2), and $4 for 2A.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> price = [2,3,4], special = [[1,1,0,4],[2,2,1,9]], needs = [1,2,1]
<strong>Output:</strong> 11
<strong>Explanation:</strong> The price of A is 2, and 3 for B, 4 for C.
You may pay 4 for 1A and 1B, and 9 for 2A ,2B and 1C.
You need to buy 1A ,2B and 1C, so you may pay 4 for 1A and 1B (special offer #1), and 3 for 1B, 4 for 1C.
You cannot add more items, though only 9 for 2A ,2B and 1C.
<strong>Explanation:</strong> The price of A is $2, and $3 for B, $4 for C.
You may pay $4 for 1A and 1B, and $9 for 2A ,2B and 1C.
You need to buy 1A ,2B and 1C, so you may pay $4 for 1A and 1B (special offer #1), and $3 for 1B, $4 for 1C.
You cannot add more items, though only $9 for 2A ,2B and 1C.
</pre>

<p>&nbsp;</p>
Expand Down
2 changes: 2 additions & 0 deletions solution/0600-0699/0679.24 Game/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<ul>
<li>除法运算符 <code>'/'</code> 表示实数除法,而不是整数除法。

<ul>
<li>例如,&nbsp;<code>4 /(1 - 2 / 3)= 4 /(1 / 3)= 12</code>&nbsp;。</li>
</ul>
Expand All @@ -26,6 +27,7 @@
<li>例如,如果 <code>cards =[1,2,1,2]</code> ,则表达式 <code>“12 + 12”</code> 无效。</li>
</ul>
</li>

</ul>

<p>如果可以得到这样的表达式,其计算结果为 <code>24</code> ,则返回 <code>true </code>,否则返回 <code>false</code>&nbsp;。</p>
Expand Down
2 changes: 2 additions & 0 deletions solution/0600-0699/0679.24 Game/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<ul>
<li>The division operator <code>&#39;/&#39;</code> represents real division, not integer division.

<ul>
<li>For example, <code>4 / (1 - 2 / 3) = 4 / (1 / 3) = 12</code>.</li>
</ul>
Expand All @@ -24,6 +25,7 @@
<li>For example, if <code>cards = [1, 2, 1, 2]</code>, the expression <code>&quot;12 + 12&quot;</code> is not valid.</li>
</ul>
</li>

</ul>

<p>Return <code>true</code> if you can get such expression that evaluates to <code>24</code>, and <code>false</code> otherwise.</p>
Expand Down
2 changes: 2 additions & 0 deletions solution/0600-0699/0682.Baseball Game/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<ul>
<li>An integer <code>x</code>.

<ul>
<li>Record a new score of <code>x</code>.</li>
</ul>
Expand All @@ -29,6 +30,7 @@
<li>Invalidate the previous score, removing it from the record.</li>
</ul>
</li>

</ul>

<p>Return <em>the sum of all the scores on the record after applying all the operations</em>.</p>
Expand Down
4 changes: 3 additions & 1 deletion solution/0700-0799/0753.Cracking the Safe/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<ul>
<li>For example, the correct password is <code>&quot;345&quot;</code> and you enter in <code>&quot;012345&quot;</code>:

<ul>
<li>After typing <code>0</code>, the most recent <code>3</code> digits is <code>&quot;0&quot;</code>, which is incorrect.</li>
<li>After typing <code>1</code>, the most recent <code>3</code> digits is <code>&quot;01&quot;</code>, which is incorrect.</li>
Expand All @@ -19,6 +20,7 @@
<li>After typing <code>5</code>, the most recent <code>3</code> digits is <code>&quot;345&quot;</code>, which is correct and the safe unlocks.</li>
</ul>
</li>

</ul>

<p>Return <em>any string of <strong>minimum length</strong> that will unlock the safe <strong>at some point</strong> of entering it</em>.</p>
Expand All @@ -42,7 +44,7 @@
- &quot;01&quot; is typed in starting from the 1<sup>st</sup> digit.
- &quot;10&quot; is typed in starting from the 3<sup>rd</sup> digit.
- &quot;11&quot; is typed in starting from the 2<sup>nd</sup> digit.
Thus &quot;01100&quot; will unlock the safe. &quot;01100&quot;, &quot;10011&quot;, and &quot;11001&quot; would also unlock the safe.
Thus &quot;01100&quot; will unlock the safe. &quot;10011&quot;, and &quot;11001&quot; would also unlock the safe.
</pre>

<p>&nbsp;</p>
Expand Down
Loading

0 comments on commit 41aa731

Please sign in to comment.