Pregunta de entrevista de Ingenico

Write an algorithm to find out if a given 2d matrix would be the same when rows and columns are swapped.