Skip to content

Commit 678eee8

Browse files
authored
Merge pull request #137 from kalyaniingle/master
Added Comment on Linear Search Logic
2 parents b8d3a07 + d3d1d03 commit 678eee8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/com/jwetherell/algorithms/search/BinarySearch.java

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ private static int recursiveFind(int value, int start, int end, boolean optimize
5656
}
5757

5858
private static final int linearSearch(int value, int start, int end) {
59+
// From index i = start to i = end check if value matches sorted[i]
5960
for (int i = start; i <= end; i++) {
6061
int iValue = sorted[i];
6162
if (value == iValue)

0 commit comments

Comments
 (0)