Repeating elements

i am not able to remove repeating elements

will i send code to you?

Hey @kingshuk441
Your code from line 17-29 was not correct
Here is the correct code please see this once

for AABC- mu code ans(AABC,AACB,ABAC,ABCA,ACBA,ACAB,BAAC,BACA,BCAA,CBAA,CABA,CAAB,) and soluton ans is(ABCA,ABAC,ACBA,ACAB,AACB,AABC,BACA,BAAC,BCAA,CBAA,CABA,CAAB,)

@kingshuk441
I apologise buddy. I read a condition wrong in your code. Your code is perfect. Only one issue.
You need to print strings in dictionary order.
For input AABC
Your code printed
CBAA
CABA
CAAB
It needs to be
CAAB
CABA
CBAA

Hope this helps

only 3 testcases are passing with this solution

and i doing same thing as in the solution

plz rectify in my code

@kingshuk441


Please see this
If your query is resolved please close it

can u also plz explain what u have made changes and why and whats the error plz tell

@kingshuk441
I simple inserted all strings in a vector
Then sorted the vector to get output in sorted order as asked by question
There was no error in your code as such
Just an extra thing was required

If your doubt is resolved please close it.

but i have sorted the array in firstly then why have to sort twice?

@kingshuk441
The second time you’re not sorting the characters
Only the strings