How to Rotate a Matrix (Clockwise and Anti-clockwise) in place?
Given a matrix with dimension NxN, rotate the matrix in place the 90 degrees clockwise and anti-clockwise. For example, original Matrix 3×3: vector<vector<int>> matrix({ {1, 2, 3}, {4, 5, …