solve the interleaving string problem.