mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
存量题库数据更新
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<ul>
|
||||
<li>It has at least <code>6</code> characters and at most <code>20</code> characters.</li>
|
||||
<li>It contains at least <strong>one lowercase</strong> letter, at least <strong>one uppercase</strong> letter, and at least <strong>one digit</strong>.</li>
|
||||
<li>It does not contain three repeating characters in a row (i.e., <code>"...aaa..."</code> is weak, but <code>"...aa...a..."</code> is strong, assuming other conditions are met).</li>
|
||||
<li>It does not contain three repeating characters in a row (i.e., <code>"B<u><strong>aaa</strong></u>bb0"</code> is weak, but <code>"B<strong><u>aa</u></strong>b<u><strong>a</strong></u>0"</code> is strong).</li>
|
||||
</ul>
|
||||
|
||||
<p>Given a string <code>password</code>, return <em>the minimum number of steps required to make <code>password</code> strong. if <code>password</code> is already strong, return <code>0</code>.</em></p>
|
||||
@@ -13,17 +13,17 @@
|
||||
<ul>
|
||||
<li>Insert one character to <code>password</code>,</li>
|
||||
<li>Delete one character from <code>password</code>, or</li>
|
||||
<li>Replace one character of <code>password</code> with another character.</li>
|
||||
<li>Replace one character of <code>password</code> with another character.</li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
<pre><strong>Input:</strong> password = "a"
|
||||
<strong>Output:</strong> 5
|
||||
</pre><p><strong>Example 2:</strong></p>
|
||||
</pre><p><strong class="example">Example 2:</strong></p>
|
||||
<pre><strong>Input:</strong> password = "aA1"
|
||||
<strong>Output:</strong> 3
|
||||
</pre><p><strong>Example 3:</strong></p>
|
||||
</pre><p><strong class="example">Example 3:</strong></p>
|
||||
<pre><strong>Input:</strong> password = "1337C0d3"
|
||||
<strong>Output:</strong> 0
|
||||
</pre>
|
||||
|
Reference in New Issue
Block a user