public class BinarySearch extends java.lang.Object
The rank operations takes logarithmic time in the worst case.
For additional documentation, see Section 1.1, page 9 of "Algorithms, 4th Edition", by Robert Sedgewick and Kevin Wayne or the booksite.
public static int rank(int key, int[] a)
public static void main(java.lang.String[] args)