Macquarie Group interview question

Technical and Behavioral. Coding challenge in round one