Domanda di colloquio di Cadence Design Systems

Scenario based coding question. Gave 15-20 mins to finish the code.