Pergunta de entrevista da empresa Yelp

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

Resposta da entrevista

Sigiloso

22 de jul. de 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.