My last test case is not giving the right answer. please check my code. https://ide.codingblocks.com/s/98273
Dictionary order last testcase
Hi Urvi ,
Try this testcase :
Input : cabd
Expected Output :
cadb
cbad
cbda
cdab
cdba
dabc
dacb
dbac
dbca
dcab
dcba
Your Output :
cadb
cbad
cbda
cdab
cdba
dcab
dcba
dacb
dabc
dbca
dbac
Since this is a tricky problem and even I spent quite some time when I was doing the course before I finally figured it out , I’ll just give you one additional hint … Sorting something might help.
1 Like
Thank you sir, I got it!
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.