Driver code
public static void main ( String [ ] args ) { Vector < Integer > a = new Vector < Integer > ( ) ; a . add ( 1 ) ; a . add ( 1 ) ; a . add ( 1 ) ; a . add ( 2 ) ; a . add ( 2 ) ; a . add ( 2 ) ; System . out . println ( Maximum_Length ( a ) ) ; } }