Pergunta de entrevista da empresa Expedia Group

Find all the permutations of a string.

Resposta da entrevista

Sigiloso

17 de ago. de 2014

This is a kind of question that you have to just brute force the answer. I had a hard time answering this question because I had been trying to find "the trick" to doing this the "right way". Unfortunately the right way is brute forcing it, so your computation complexity of this is going to be O(n!). Not fun.