matrix rotation by transpose method

Rotate a matrix by 90 degree without using any extra space(Anticlockwise)

Rotate a matrix by 90 degree without using any extra space(Anticlockwise)

(Asked by MICROSOFT, PAYTM, SAMSUNG, AMAZON, SNAPDEAL…)