HCL interview question

Design patterns