Pinwheel (NY) interview question

Practical coding question in the range of LC medium difficulty