Pergunta de entrevista da empresa 1stDibs.com

Generate all possible permutation of a given string. e.g. Input: abc output: abc, acb, bac, bca, cab, cba

Resposta da entrevista

Sigiloso

25 de mar. de 2021

If length of input is n then answer would be n! and we could use any Data strucuture to implement it. We can solve it using recusrion.