Cohesity interview question

Two coding questions in first technical round.