# Permutations with and without Repetition

Learn the difference between permutations with and without repetition.

## We'll cover the following

## Reordering a string with repetition

Our next problem deals with generating permutations and combinations. How many ways can we rearrange a string? If repetition is allowed, the number will be large. How does this happen?

A **string** is a sequence of characters. It’s a representation of data structure, an array of characters.

Therefore, it has a length. If repetition is allowed, we can count the length of the string and safely say that the factorial of that number is the number of ways a string can be rearranged. But the real trick is how rearrangement works.

Get hands-on with 1400+ tech skills courses.