human
Check if Array forms an increasing | Function to check if the given array forms an increasing decreasing sequence or vice versa.
Base Case.
First subarray is stricly increasing.
Check for strictly increasing condition & find the break point.
Check for strictly decreasing condition & find the break point.
If i is equal to length of array.
First subarray is strictly Decreasing.
Check for strictly increasing condition & find the break point.
Check for strictly increasing condition & find the break point.
If i is equal to length of array - 1.
Condition if ar [ 0 ] == ar [ 1 ].
Given array arr.
Function Call"
How can the above be solved in Python?

=====
Write me a code to check if Array forms an increasing and the other steps required?
assistant
#Here is code to check if Array forms an increasing and the other steps required.
 def canMake ( n , ar ) :
	if ( n == 1 ) :
		return True ;
	else :
		if ( ar [ 0 ] < ar [ 1 ] ) :
			i = 1 ;
			while ( i < n and ar [ i - 1 ] < ar [ i ] ) :
				i += 1 ;
			while ( i + 1 < n and ar [ i ] > ar [ i + 1 ] ) :
				i += 1 ;
			if ( i >= n - 1 ) :
				return True ;
			else :
				return False ;
		elif ( ar [ 0 ] > ar [ 1 ] ) :
			i = 1 ;
			while ( i < n and ar [ i - 1 ] > ar [ i ] ) :
				i += 1 ;
			while ( i + 1 < n and ar [ i ] < ar [ i + 1 ] ) :
				i += 1 ;
			if ( i >= n - 1 ) :
				return True ;
			else :
				return False ;
		else :
			for i in range ( 2 , n ) :
				if ( ar [ i - 1 ] <= ar [ i ] ) :
					return False ;
			return True ;
arr = [ 1 , 2 , 3 , 4 , 5 ] ;
n = len ( arr ) ;
if ( canMake ( n , arr ) == False ) :
	print ( " Yes " ) ;
else :
	print ( " No " ) ;