Driver code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 2 , 1 , 3 , 5 , 12 , 11 , 7 , 9 ] ; NEW_LINE N = len ( arr ) ; NEW_LINE L = 2 ; NEW_LINE R = 6 ; NEW_LINE if ( hasCrest ( arr , N , L , R ) ) : NEW_LINE INDENT print ( " Yes " ) ; NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) ; NEW_LINE DEDENT DEDENT