Distinct permutations of a number
Given an integer N, the task is to print all distinct permutations of the number N. Examples: Input: N = 133Output: 133 313 331Explanation:There are a total of 6 permutations, which are [133, 313, 331, 133, 313, 331].Out of all these permutations, distinct permutations are [133, 313, 331]. Input: N