public int size ( Key low , Key high ) { if ( low . compareTo ( high ) > 0 ) return 0 ; if ( contains ( high ) ) return rank ( high ) - rank ( low ) + 1 ; else return rank ( high ) - rank ( low ) ; }
Returns the number of keys in the symbol table in the given range .