I have total partitions of an integer and I want only those partitions which have all the values unequal.
For ex.
-Partitions of 3 are {1,1,1,1},{2,2},{3,1},{1,1,2} and {4}.
So, the required unequal partitions are {3,1}
and {4}
because they contain no equal elements.I can filter the partitions to get the desired result, but I want some efficient way to find all the partitions, which have no equal terms in them, without finding all the partitions. I have searched the net and StackOverflow but nothing states exactly the problem that I am facing. Every idea is appreciated. Thanks.