Saturday, January 6, 2018

Matrix spiral print algorithm

January 6, 2018

Introduction


It is another 10:00 AM mock interview. The peer worked on the algorithm called the matrix spiral print algorithm. So surprisingly, I learned a new way to write the solution and also the code is much simple and easy to follow.


Code study


Here is C++ code to pass all test cases.

It is so interesting to read the blog I write back in March 2016, the first time I practiced the same algorithm on mock interview platform. At that time, I was so shy and the code I wrote was not so clean and readable. And I even read the code I wrote back to 2015.




No comments:

Post a Comment