Fast Enterprises interview question

Technical question (Coding)