Interleaving string dynamic solution