text: Returns index of key in arr [ l . . h ] if key is present , otherwise returns - 1
code: static int search ( int [ ] arr , int l , int h , int key ) { if ( l > h ) return - 1 ; int mid = ( l + h ) / 2 ; if ( arr [ mid ] == key ) return mid ;