human
Area of the largest rectangle formed by lines parallel to X and Y axis from given set of points | Function to return the area of the largest rectangle formed by lines parallel to X and Y axis from given set of points.
Initialize two arrays.
Store x and y coordinates.
Sort arrays.
Initialize max differences.
Find max adjacent differences.
Return answer.
Driver Code.
Given points.
Total points.
Function call"
How can the above be solved in Python?

=====
Can you provide a code to area of the largest rectangle formed by lines parallel to X and Y axis from given set of points and the other steps required?
assistant
#Here is code to area of the largest rectangle formed by lines parallel to X and Y axis from given set of points and the other steps required.
 def maxRectangle ( sequence , size ) :
	X_Cord = [ 0 ] * size
	Y_Cord = [ 0 ] * size
	for i in range ( size ) :
		X_Cord [ i ] = sequence [ i ] [ 0 ]
		Y_Cord [ i ] = sequence [ i ] [ 1 ]
	X_Cord . sort ( )
	Y_Cord . sort ( )
	X_Max = 0
	Y_Max = 0
	for i in range ( size - 1 ) :
		X_Max = max ( X_Max , X_Cord [ i + 1 ] - X_Cord [ i ] )
		Y_Max = max ( Y_Max , Y_Cord [ i + 1 ] - Y_Cord [ i ] )
	return X_Max * Y_Max
if __name__ == " _ _ main _ _ " :
	point = [ [ - 2 , 0 ] , [ 2 , 0 ] , [ 4 , 0 ] , [ 4 , 2 ] ]
	n = len ( point )
	print ( maxRectangle ( point , n ) )