human
Maximum in array which is at | Function to find the index of Max element that satisfies the condition.
Finding index of max of the array.
Returns - 1 if the max element is not twice of the i - th element ..
Driver code"
How can the above be solved in Python?
 Write me a code to maximum in array which is at and the other steps required?
assistant
#Here is code to maximum in array which is at and the other steps required.
 def findIndex ( arr ) :
	maxIndex = 0
	for i in range ( 0 , len ( arr ) ) :
		if ( arr [ i ] > arr [ maxIndex ] ) :
			maxIndex = i
	for i in range ( 0 , len ( arr ) ) :
		if ( maxIndex != i and arr [ maxIndex ] < ( 2 * arr [ i ] ) ) :
			return - 1
	return maxIndex
arr = [ 3 , 6 , 1 , 0 ]
print ( findIndex ( arr ) )