Amazon Interview Question

Matrix Problem, rotating it 90 degrees