Logicdrop interview question

Design patterns