This frustrates me so much, even though I understand basic principles of recursion. When it comes to applying it to solving complicated algorithms I just can’t figure out how to take advantage of it. It frustrates me so much, it just makes me want to quit(that’s not going to happen don’t worry) it makes me feel I am not wired for understanding such a complicated things and it gives me the worst feeling ever that I am just not smart enough for this profession.
I am trying to solve no repeat please algorithm and it requires recursion. I kind of know what I need to do to solve it but I just can’t pull off the code. It is so bad I can’t even figure out how other people’s code work. There are so many things going on simultaneously that I just lose the track of it. It causes so much confusion for me.
Here is the link to algorithm No-repeats-please:
So I know I need to write function that will give me an array of all permutations of the string
And my mathematical idea of how to do it is described in this video so I understand how to break down permutation process.
Then I filter the array with the regex expression that looks for repeated characters in an array of strings.
Sounds easy but it is not.
I got no idea how to write the code that follows this process of permutation and I it is destroying me. Please help me somehow.