Amazon Interview Question

Rotate a 2D matrix in linear time.

Interview Answer

Anonymous

Jun 27, 2018

You can't, you have to touch all the elements once, so it has to be n^2 time at least.