Thoughtworks Interview Question

Case study was given to solve