Driver code
public static void main ( String [ ] args ) { int n = 6 ; ArrayList < Integer > a = new ArrayList < Integer > ( ) ; a . add ( 2 ) ; a . add ( 4 ) ; a . add ( 3 ) ; a . add ( 2 ) ; a . add ( 4 ) ; a . add ( 5 ) ; a . add ( 3 ) ; sort ( a , n ) ; } }