GetYourGuide interview question

Technical interview : refactoring Question