Skip to content

Commit

Permalink
advanced binary
Browse files Browse the repository at this point in the history
  • Loading branch information
holabayor committed Oct 5, 2022
1 parent bf5b8be commit 4355929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 0x1E-search_algorithms/104-advanced_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int bin_search(int *array, int value, size_t lb, size_t ub)
if (array[mid] == value)
{
if (array[mid - 1] == value)
return (bin_search(array, value, mid - 1, mid));
return (bin_search(array, value, lb, mid));
return (mid);
}
if (array[mid] < value)
Expand Down

0 comments on commit 4355929

Please sign in to comment.