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 f7c8b44

Browse files
committed
code cleanup
1 parent a560a18 commit f7c8b44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Algorithms/binarySearch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ long binarySearch(int A[], int n, int key){
4848
int m = 0;
4949
int l = 1; int r = n;
5050
while(l <= r){
51-
m = l + (r-l)/2; // prevent float errors & hence infinite loop
51+
m = l + (r-l)/2; // prevent float errors & infinite loop
5252
if(A[m] == key){ // first comparison
5353
return m;
5454
}else if( A[m] < key ){ // second comparison

0 commit comments

Comments
(0)

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