solve the scarmble string problem.