Cohesity Interview Question

Two coding questions in first technical round.