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 1162a5e

Browse files
Merge pull request #142 from gauravdarbhanga/patch-4
Comment LowerBound.java
2 parents 678eee8 + 4e8de43 commit 1162a5e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/com/jwetherell/algorithms/search/LowerBound.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public static int lowerBound(int[] array, int length, int value) {
2323
int high = length;
2424
while (low < high) {
2525
final int mid = (low + high) / 2;
26+
//checks if the value is less than middle element of the array
2627
if (value <= array[mid]) {
2728
high = mid;
2829
} else {

0 commit comments

Comments
(0)

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