Skip to content

Commit c6c6276

Browse files
committed
Lesson 2 fixing typo on class name
1 parent 91d6547 commit c6c6276

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/packt/datastructuresandalg/lesson2/sorting/BinarySearchRecursive.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ public boolean binarySearch(int x, int[] sortedNumbers, int start, int end) {
1010
if (start <= end) {
1111
int mid = (end - start) / 2 + start;
1212
if (sortedNumbers[mid] == x) return true;
13-
if (sortedNumbers[mid] > x) return binarySearch(x, sortedNumbers, start, mid - 1);
13+
if (sortedNumbers[mid] > x)
14+
return binarySearch(x, sortedNumbers, start, mid - 1);
1415
return binarySearch(x, sortedNumbers, mid + 1, end);
1516
}
1617
return false;

0 commit comments

Comments
 (0)