human
Find element in a sorted array whose frequency is greater than or equal to n / 2. | Python 3 code to find majority element in a sorted array.
Driver Code"
Solution in Python:
assistant
#Here is code to find element in a sorted array whose frequency is greater than or equal to n / 2.
 def findMajority ( arr , n ) :
	return arr [ int ( n / 2 ) ]
arr = [ 1 , 2 , 2 , 3 ]
n = len ( arr )
print ( findMajority ( arr , n ) )