trivago interview question

discussion about patterns.