An image is stored as an grid of pixel values, and you need to rotate it by quarter turns without building a second grid.
Write rotate_in_place(matrix, k=1) that rotates matrix by k quarter turns clockwise.
matrix: a list of n lists, each of length n (). Entries are any Python values.k: an integer number of clockwise quarter turns. Negative k means counter-clockwise turns. Any integer is allowed.matrix itself (the same outer list and the same row lists) and return None.After one clockwise turn, the value that was at row i, column j ends up at row j, column n - 1 - i.
[]) stays empty.