Thursday, March 8, 2018

Spiral matrix print algorithm

March 8, 2018

Introduction


It is my most favorite algorithm in 2018. I learn so many lessons from the algorithm, and I can count so many hours I have spent on the algorithm. My most favorite experience is documented here, one thing I did not tell that the first mock interviewer on anonymous platform in 2018 failed me on this algorithm and marked me as poor as the technical skills. I did not write fully functioning code following the idea using direction array and automate the direction change.

One more interview


I chose the algorithm to interview the peer on March 7, 2018 10:00 PM. The peer spent near 45 minutes to complete the algorithm.

Here is C# code I reviewed.

Even though I have worked on the algorithm so many hours, I did not perform very well as an interviewer yesterday. I preferred one while loop instead of three loops with while/for/while, I confused and made wrong judgement to say that for loop will have dead loop, actually the for loop direction array only has size of 4.

Actionable Items


I like to replay the mock interview I did on January 23, 2018 to work on spiral matrix print algorithm. After 30 days of mock interview, I like to compare myself with all my 13 interviewee to work on the same algorithm.

What should I work on to perform better through mock interview?



No comments:

Post a Comment