Wolt Interview Question

Technical question relating to the home work task I was given