Trainline interview question

Design patterns and algorithms, etc