Thursday, November 23, 2017

Code review: four sum algorithm mock interview practice

Nov. 23, 2017


Introduction


It is my favorite time to ask a question on code review website. I have practiced the mock interview on Leetcode 4 sum problem over 3 times since March 2017.

The code review is titled Four sum algorithm mock interview practice.

Will document some ideas to improve the question.

Follow up 


It is Nov. 25, 2017 1:13 PM, as a person to be responsible for my own question, I only got one up-vote and 80 views, and then stackoverflow does not share my question on twitter this time. I certainly know that my writing does not make a case for my title. Instead of after reviewing the writing more than 20 times, I rewrote in the following:

Whiteboard testing is savior  - it is tough topic to make some sense! 

Whiteboard testing is the tool in mock interview to show how I am responsible for my own code, be critical thinker. Being a responsible person, make a plan, and follow through the plan, that makes a person success. It does matter for the algorithm and data structure mock interview practice as well, follow through with a whiteboard testing to review and think one more time.
Recently, the peer asked me not to do whiteboard testing during the mock interview, because the peer was happy about my coding. After the mock interview I spent over one hour to using Visual Studio and tried to find one simple mistake to mix two variable names, actually the bug can easily be found in less than five minutes through the whiteboard testing. Through the instance I learn that the whiteboard testing is such a simple habit to build and a savior for me as a mediocre programmer. It should have saved me hundreds of hours through the career if I build the habit the first day as a programmer.


Writing is fun


Writing is like a tennis sports, you have to find ways to make it work. I posted the question and only got one up-vote, then I noticed that I have to work on more and express my intent more grounded. People are busy and no one can figure out what I try to talk about if I do not review very carefully. Try to avoid the ambiguity. The word savior in the title may not be  a good one, need to find one to replace the word. 

Here is the edit of 14th:

No comments:

Post a Comment