Cisco Interview Question

Technical round 2, coding round 1