If arr [ i ] is less than arr [ i - 1 ] and arr [ i ]
if ( arr [ i ] < arr [ i - 1 ] && arr [ i ] < arr [ i + 1 ] ) { System . out . println ( " Yes " ) ; return ; } } System . out . println ( " No " ) ; }