Solution for problem [Word Break II]