To some of us your question is a bit vague. Others may understand it.
If you could give an example of the array and the desired output I would understand better. Also include any code you have written so far. It goes a long way to understand what you know and are trying to do.
actually the heap algo works for suppose an array {1,2,3} and prints permutations as
1 2 3
2 1 3
3 1 2
1 3 2
2 3 1
3 2 1
but when I print the permutations for {1,2,2} i.e. a no is repeating then it prints
1 2 2
2 1 2
2 1 2
1 2 2
2 2 1
2 2 1
i want unique permutations of this array.i.e. the same permutation does not repeat again.
please help me how to do it