mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
committed by
GitHub
parent
cce1dbd124
commit
03a4832a7d
@@ -0,0 +1,16 @@
|
||||
package com.thealgorithms.devutils.searches;
|
||||
|
||||
/**
|
||||
* The common interface of most searching algorithms that search in matrixes.
|
||||
*
|
||||
* @author Aitor Fidalgo (https://github.com/aitorfi)
|
||||
*/
|
||||
public interface MatrixSearchAlgorithm {
|
||||
/**
|
||||
* @param key is an element which should be found
|
||||
* @param matrix is a matrix where the element should be found
|
||||
* @param <T> Comparable type
|
||||
* @return array containing the first found coordinates of the element
|
||||
*/
|
||||
<T extends Comparable<T>> int[] find(T matrix[][], T key);
|
||||
}
|
||||
Reference in New Issue
Block a user