Driver Code
public static void Main ( String [ ] args ) { List < int > arr = new List < int > ( ) ; arr . Add ( 2 ) ; arr . Add ( 7 ) ; arr . Add ( 1 ) ; arr . Add ( 8 ) ; arr . Add ( 2 ) ; arr . Add ( 8 ) ; Permute ( arr , arr . Count ) ; } }