IBM interview question

Complicated design that I worked