Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT arr = [ 2 , 3 , 2 , 4 , 4 , 6 , 3 , 2 ] NEW_LINE N = len ( arr ) NEW_LINE left = [ 0 for i in range ( N ) ] NEW_LINE right = [ 0 for i in range ( N ) ] NEW_LINE preprocess ( arr , N , left , right ) NEW_LINE L = 0 NEW_LINE R = 2 NEW_LINE if ( isSubarrayMountainForm ( arr , left , right , L , R ) ) : NEW_LINE INDENT print ( " Subarray ▁ is ▁ in ▁ mountain ▁ form " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Subarray ▁ is ▁ not ▁ in ▁ mountain ▁ form " ) NEW_LINE DEDENT L = 1 NEW_LINE R = 3 NEW_LINE if ( isSubarrayMountainForm ( arr , left , right , L , R ) ) : NEW_LINE INDENT print ( " Subarray ▁ is ▁ in ▁ mountain ▁ form " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Subarray ▁ is ▁ not ▁ in ▁ mountain ▁ form " ) NEW_LINE DEDENT DEDENT