Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 553d10d

Browse files
authored
Update BinarySearch.md
1 parent 8295e7f commit 553d10d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎binary-search/BinarySearch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,11 +864,11 @@ class RotationCountWithDuplicates {
864864
// choose a side the best we can do is to skip one number from both
865865
// ends if they are not the smallest number
866866
if (arr[start] == arr[mid] && arr[end] == arr[mid]) {
867-
if (arr[start] > arr[start + 1]) // if element at start+1 is not
867+
if (arr[start] > arr[start + 1]) // if element at start+1 is
868868
// the smallest
869869
return start + 1;
870870
++start;
871-
if (arr[end - 1] > arr[end]) // if the element at end is not the
871+
if (arr[end - 1] > arr[end]) // if the element at end is the
872872
// smallest
873873
return end;
874874
--end;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /