Learn how to generate all permutations of strings with and without character repetition using recursive algorithms and factorial concepts.