Intuitive Permutations Solution

Can anyone provide a link to a tutorial to solve the No Repeats problem that is very intuitive?

After reading the Get Help section and finding it somewhat unhelpful, I watched a few non-language-specific video tutorials and scraped together my own solution based on the common factorial tree demonstration. The solution was not DRY, and didn’t meet the challenge requirements, but I decided to leave it as is because it had taken up a lot of my time.

I then viewed this solution by Time Complexity Infinity, which was the most easily-explained I’d seen up to that point. I recognized the factorial tree structure, and I understand the code entirely, but the way he writes the recursive function, especially with the manipulation of the array, took me way too long to wrap my head around.

Still, it’s the most elegant solution I’ve seen yet. However, I feel as though I haven’t grasped this challenge sufficiently, as opposed to the previous challenges, which I managed to do and could rewrite from memory.

Can anyone help me understand the solution to this challenge more fully? I don’t have a strong maths background, although I am willing to learn specific concepts for coding challenges.

Hi @dylanhamada!

What part of the challenge is giving you trouble? It sounds like the recursion approach is giving you the most trouble. What other options have you tried?

I just started working on the optional algorithm challenges myself for extra practice so I haven’t solved this one yet. But the recursive approach is a little tricky for me too. So I might have to find a different way.

This discussion right here might also help you grasp the algorithm.

Good luck!