Confluent Interview Question

A brute force question looking for types of permutations in a string.