Driver Code
public static void main ( String [ ] args ) { Vector < Integer > arr = new Vector < Integer > ( ) ; arr . add ( 2 ) ; arr . add ( 7 ) ; arr . add ( 1 ) ; arr . add ( 8 ) ; arr . add ( 2 ) ; arr . add ( 8 ) ; Permute ( arr , arr . size ( ) ) ; } }