Pergunta de entrevista da empresa Ingenico

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