Rotate image(n*n array)

sir it is not passing 1 test case

Check the constraints
Constraints

N < 1000

But you have restricted your matrix to size 10x10
Increase it to 1000x1000 and then check.