Expedia Group Interview Question

Find all the permutations of a string.

Interview Answer

Anonymous

Aug 17, 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.