Cadence Design Systems interview question

LeetCode question : 48. Rotate Image