Driver code
public static void main ( String [ ] args ) { int a [ ] = { 1 , 5 , 4 , 3 } ; int b [ ] = { 3 , 1 , 2 , 4 , 5 } ; int len1 = 4 ; System . out . print ( maxArea ( a , len1 ) + "NEW_LINE" ); int len2 = 5 ; System . out . print ( maxArea ( b , len2 ) ) ; } }