mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 16:01:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<p>Return <em>that maximum distance to the closest person</em>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/10/distance.jpg" style="width: 650px; height: 257px;" />
|
||||
<pre>
|
||||
<strong>Input:</strong> seats = [1,0,0,0,1,0,1]
|
||||
@@ -18,7 +18,7 @@ If Alex sits in any other open seat, the closest person has distance 1.
|
||||
Thus, the maximum distance to the closest person is 2.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> seats = [1,0,0,0]
|
||||
@@ -28,7 +28,7 @@ If Alex sits in the last seat (i.e. seats[3]), the closest person is 3 seats awa
|
||||
This is the maximum distance possible, so the answer is 3.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> seats = [0,1]
|
||||
|
Reference in New Issue
Block a user