Fast Enterprises interview question

Explain the code that you wrote