Pergunta de entrevista da empresa Daffodil Software

WAP where input is "abc" then all possible combinations like bca cab need to be printed.

Resposta da entrevista

Sigiloso

15 de jun. de 2015

As max possible combinations can be n! so I took an array to that size of type string. another array was needed to store original string characters. I swapped original string character array using its index no. at every combination I checked for Its presence in string Array if present then discarded otherwise added.

1