Cadence Design Systems interview question

Difficult project / time I struggled