Pregunta de entrevista de Expedia Group

Find all the permutations of a string.

Respuesta de la entrevista

Anónimo

17 ago 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.