Domanda di colloquio di Virgin Gates

How can we use this design pattern to solve this problem ?