Pregunta de entrevista de HubSpot

Algorithm to split word in n sections, and display the section most repeated