ZS Associates Interview Question

They asked me to solve a puzzle in HR interview