mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 15:01:40 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<p>Given a string <code>s</code> consisting of <strong>only</strong> the characters <code>'a'</code> and <code>'b'</code>, return <code>true</code> <em>if <strong>every</strong> </em><code>'a'</code> <em>appears before <strong>every</strong> </em><code>'b'</code><em> in the string</em>. Otherwise, return <code>false</code>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "aaabbb"
|
||||
@@ -11,7 +11,7 @@ The 'a's are at indices 0, 1, and 2, while the 'b's are at indic
|
||||
Hence, every 'a' appears before every 'b' and we return true.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "abab"
|
||||
@@ -21,7 +21,7 @@ There is an 'a' at index 2 and a 'b' at index 1.
|
||||
Hence, not every 'a' appears before every 'b' and we return false.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "bbb"
|
||||
|
Reference in New Issue
Block a user