Driver Code
public static void main ( String [ ] args ) { char ar [ ] = { ' e ' , ' g ' , ' t ' , ' y ' } ; int n = ar . length ; char K = ' u ' ; char ch = bs ( ar , n , K ) ; if ( ch == ' @ ' ) System . out . print ( " - 1" ) ; else System . out . print ( ch ) ; } }