Freshworks interview question

They asked a program in string