Pregunta de entrevista de Yelp

Given a 2D array, how do you print "spirally"?

Respuesta de la entrevista

Anónimo

22 jul 2017

Have limits on for x_min and x_max along with y_min and y_max. As you print the matrix, increment decrement the min/maxes as necessary. You can keep a visited set to make sure not to print something that has already been printed.