My code is not working

My code is not working. Please check out what mistake I made. Note: Instead of using next_permuation function I implemented my own permutation function to understand the concept.

My code: https://ide.codingblocks.com/s/413971
Problem: https://hack.codingblocks.com/app/practice/1/1098/problem

hello @Dancool32

u r reading integers as character which is wrong.

image

To make it easier for sorting as well as perform permutations I stored the integers in a character array. My approach is similar to the approach given in the link below. Mine has a few modification to suit this question. https://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/

@Dancool32
run this program->

and see the output.

u will get ur mistake

Got my mistake here. I totally forgot about multi digit no’s like 32 100 etc.

Updated Code: https://ide.codingblocks.com/s/413971

Still face the same issue please check it out.

image

it is producing duplicates