Function to find index of value in arr [ start ... end ] . The function assumes that value is postsent in in [ ]
public virtual int search ( int [ ] arr , int strt , int end , int value ) { int i ; for ( i = strt ; i <= end ; i ++ ) { if ( arr [ i ] == value ) { break ; } } return i ; }