Hired interview question

Design question with protocols.