Update 33.cpp

This commit is contained in:
Andrew 2019-11-22 08:47:30 +07:00 committed by GitHub
parent 8fecab6dcf
commit 8ed394701a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,8 +45,6 @@ void print_matrix(int **matrix, size_t nrows, size_t ncols) {
void transpose(int **matrix, size_t size) {
for(size_t i = 0; i < size; i++) {
for(size_t j = i; j < size; j++) {
int ri = *(*(matrix + i) + j);
int ci = *(*(matrix + j) + i);
swap(*(*(matrix + i) + j), *(*(matrix + j) + i));
}
}