Agoda interview question

- recursion problem - sql optimization - design pattern