Question d’entretien chez Zscaler

How can you optimize this set of code?