Dayforce interview question

Solve 2 sum lc question