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 99b42cb

Browse files
binary search
1 parent 04d623a commit 99b42cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎Searching/binarySearch.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public static void main(String[] args) {
66
int target = 6;
77
int result = binarySearching(arr, target);
88
System.out.println("the target element index is: " + result);
9+
910
}
1011

1112
public static int binarySearching(int arr[], int target) {
@@ -24,8 +25,10 @@ public static int binarySearching(int arr[], int target) {
2425
}else{
2526
start = mid + 1;
2627
}
27-
}
28+
}
29+
2830
}
31+
2932
return -1;
3033
}
3134
}

0 commit comments

Comments
(0)

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