CME Group interview question

Q: Medium Level Difficulty Coding Question