Thoughtworks interview question

Case study was given to solve