mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-06 17:29:31 +08:00
@ -31,7 +31,7 @@ class BinarySearch implements SearchAlgorithm {
|
||||
*/
|
||||
@Override
|
||||
public <T extends Comparable<T>> int find(T[] array, T key) {
|
||||
return search(array, key, 0, array.length);
|
||||
return search(array, key, 0, array.length - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user