From 4e8de437ac1e921b319a8ff876e2ff81f1d9c7de Mon Sep 17 00:00:00 2001 From: gauravdarbhanga <57192490+gauravdarbhanga@users.noreply.github.com> Date: Thu, 31 Oct 2019 00:14:19 +0530 Subject: [PATCH] Update LowerBound.java --- src/com/jwetherell/algorithms/search/LowerBound.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/jwetherell/algorithms/search/LowerBound.java b/src/com/jwetherell/algorithms/search/LowerBound.java index 569e4532..9e6cd353 100644 --- a/src/com/jwetherell/algorithms/search/LowerBound.java +++ b/src/com/jwetherell/algorithms/search/LowerBound.java @@ -23,6 +23,7 @@ public static int lowerBound(int[] array, int length, int value) { int high = length; while (low < high) { final int mid = (low + high) / 2; + //checks if the value is less than middle element of the array if (value <= array[mid]) { high = mid; } else {