vector<vector<int>> transpose(vector<vector<int>>& A) { vector<vector<int>> V; int RowLen = A.size(); int ColLen = A[0].size(); for (int j = 0; j < ColLen; j++) { vector<int> v; for (int i = 0; i < RowLen; i++) { v.push_back(A[i][j]); } V.push_back(v); } return V; }