有人有指数搜索的Java实现吗?我找不到有关该算法的任何信息,也不知道如何实现它。就像是:
* Signature method that must implement exponential search.
* @ Param searchArray integer array in ascending.
* @ Param x integer element to search for.
* @ Return integer containing the position in the array <CODE> searchArray <\ CODE>
* In case the element <CODE> x <\ CODE> be located in this otherwise
* <CODE> Returns NOT_FOUND </ CODE>
public int exponentialSearch (int [] searchArray, int x);