private void moveLeftToTop(int[][] matrix, int first, int last, int i, int offset) {
    matrix[first][i] = matrix[last - offset][first];
  }
Iterative algorithm to solve this problem. This solution is based on move 4 positions per
iteration. With this approach we can reduce the complexity order in space terms from O(N^2) to
O(1). In time terms, the complexity order is O(N^2) where N is the height or width of the
matrix.
src/main/java/com/github/pedrovgs/problem54/RotateMatrix.java