Amazon interview question

Stock span problem Rotate a matrix by 90 degrees.