Domanda di colloquio di Microsoft

given a string, reverse every substring that contains only alphanumerical characters