human
Find a triplet ( i , j , k ) from an array such that i < j < k and arr [ i ] < arr [ j ] > arr [ k ] | Function to find a triplet such that i < j < k and arr [ i ] < arr [ j ] and arr [ j ] > arr [ k ].
Traverse the array.
Condition to satisfy for the resultant triplet.
Otherwise , triplet doesn 't exist.
Driver Code"
How can the above be solved in Python?
 ... Can you provide a code to find a triplet ( i , j , k ) from an array such that i < j < k and arr [ i ] < arr [ j ] > arr [ k ] and the other steps required?
assistant
#Here is code to find a triplet ( i , j , k ) from an array such that i < j < k and arr [ i ] < arr [ j ] > arr [ k ] and the other steps required.
 def print_triplet ( arr , n ) :
	for i in range ( 1 , n - 1 ) :
		if ( arr [ i - 1 ] < arr [ i ] and arr [ i ] > arr [ i + 1 ] ) :
			print ( i - 1 , i , i + 1 )
			return
	print ( - 1 )
if __name__ == " _ _ main _ _ " :
	arr = [ 4 , 3 , 5 , 2 , 1 , 6 ]
	N = len ( arr )
	print_triplet ( arr , N )