Pregunta de entrevista de Freshworks

First round: String based DSA problem (HARD)