an AC solution for scramble strings
a more memory effecient solution
a space-time tradeoff version for scramble strings