Driver code
public static void Main ( String [ ] args ) { int [ ] arr = { 2 , 1 , 3 , 5 , 12 , 11 , 7 , 9 } ; int N = arr . Length ; int L = 2 ; int R = 6 ; if ( hasCrest ( arr , N , L , R ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }