eBay interview question

Rotate a matrix by 90 degree without using any extra space