Skip to content

Commit

Permalink
Merge pull request youngyangyang04#2107 from zou-weidong/patch-1
Browse files Browse the repository at this point in the history
Update 0034.在排序数组中查找元素的第一个和最后一个位置.md
  • Loading branch information
youngyangyang04 authored Jun 14, 2023
2 parents 5d344fc + 4a6e87f commit 882463b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class Solution {
while (left - 1 >= 0 && nums[left - 1] == nums[index]) { // 防止数组越界。逻辑短路,两个条件顺序不能换
left--;
}
// 向左滑动,找右边界
// 向右滑动,找右边界
while (right + 1 < nums.length && nums[right + 1] == nums[index]) { // 防止数组越界。
right++;
}
Expand Down

0 comments on commit 882463b

Please sign in to comment.