ByteDance interview question

rotate a 2d array in place