Walmart interview question

Rotate a nd matrix without using numpy.