BT Group Interview Question

Design pattern, problem solving