Add generic Node classes (#2782)

Co-authored-by: Andrii Siriak <siryaka@gmail.com>
This commit is contained in:
Aitor Fidalgo Sánchez
2021-11-08 19:03:06 +01:00
committed by GitHub
parent 78f770683a
commit 7f3eb1b6dc
16 changed files with 329 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
package 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);
}