human
Find a Fixed Point ( Value equal to index ) in a given array | Python program to check fixed point in an array using linear search.
If no fixed point present then return - 1.
Driver program to check above functions"
Solution in Python:
assistant
#Here is code to find a Fixed Point ( Value equal to index ) in a given array and the other steps required.
 def linearSearch ( arr , n ) :
	for i in range ( n ) :
		if arr [ i ] is i :
			return i
	return - 1
arr = [ - 10 , - 1 , 0 , 3 , 10 , 11 , 30 , 50 , 100 ]
n = len ( arr )
print ( " Fixed ▁ Point ▁ is ▁ " + str ( linearSearch ( arr , n ) ) )