mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-29 07:26:01 +08:00
Change project structure to a Maven Java project + Refactor (#2816)
This commit is contained in:

committed by
GitHub

parent
8e533d2617
commit
9fb3364ccc
@ -0,0 +1,17 @@
|
||||
package com.thealgorithms.devutils.searches;
|
||||
|
||||
/**
|
||||
* The common interface of most searching algorithms
|
||||
*
|
||||
* @author Podshivalov Nikita (https://github.com/nikitap492)
|
||||
*/
|
||||
public interface SearchAlgorithm {
|
||||
|
||||
/**
|
||||
* @param key is an element which should be found
|
||||
* @param array is an array where the element should be found
|
||||
* @param <T> Comparable type
|
||||
* @return first found index of the element
|
||||
*/
|
||||
<T extends Comparable<T>> int find(T array[], T key);
|
||||
}
|
Reference in New Issue
Block a user