Pergunta de entrevista da empresa Freshworks

First round: String based DSA problem (HARD)