Blog Archives

Print All Permutations of Sets

A permutation of a set is an arrangement of the elements in a particular order. For example, there are two permutations of {1,2}, namely {1,2} and {2,1}, and 6 permutations of {1,2,3}, namely {1,2,3}, {1,3,2}, {2,1,3}, {2,3,1}, {3,1,2}, and {3,2,1}.

Tagged with: ,
Posted in Algorithm, Java