Pregunta de entrevista de Cadence Design Systems

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