Tuesday, February 6, 2018

The valuable lesson to be a good interviewer

Feb. 6, 2018

Introduction



I never expect that I have to learn how to be a good interviewer until I finished 10:00 PM mock interview today. I got the feedback from an experienced programmer.


Code review


I have to review the code the peer wrote and also need to think about the feedback I got.

First algorithm is about Spiral Matrix. I did review the code and the code is very good.

Second algorithm is about float number and operators, I had to review the brute force solution. I did learn something from the code as well.

My feedback


It is hard to learn to be a good interviewer. I have to learn to focus on the basics and remove my bias.

The interviewee wrote very readable code and also very easy to work with. He did show his solution on the first algorithm Spiral matrix, the code he wrote demoed his very good analysis skills and high coding standard in his daily practice. The second algorithm is float numbers and operators, and then the peer wrote a solution but failed to pass test case [1, 12, -3], and then the peer asked for the hint, and then he came out the idea by himself to write a brute force solution using O(N^4) time complexity and also space O(N^4). The interviewee also taught me something as an interviewer, what I should learn. For example, I have to leave impression to the person, first the difficult level of the algorithm, is the algorithm for senior developer or junior developer. There are several areas the interviewee can improve, like coding style, communication skills, like algorithm analysis of the second algorithm. How to come out the optimal solution, reduce the time complexity from 4^N to 2^N? Based on the conversation after the mock interview, I think that interviewee taught me a good lesson to be an interviewer. I decide to let him go to next round.


Feedback from the interviewee


I have to make mistakes in order to learn to be a good interviewer.

Here is the feedback. Please close your eyes.

Would you want to work with this person? No
How good were the questions? Waste of time
How helpful was your interviewer in guiding you to the solutions? Not helpful at all
Help your interviewer get better!
Please put more thought into the questions you're asking others. Usually there are multiple ways to solve any problem - you as interviewer should be fine with any of the ways interviewee solves posed problem.


Play with the code


It is unbelievable that the interviewee wrote production ready code, so I changed the code to C# programming and ran the test case, it works for [1, 12, -3] with maximum value 33, the C# code is here.

I am not sure how the interviewee came out the design and wrote almost perfect code for a brute force solution. I continuously played the code and added some comment to look into those variables. Here is the C# code with some comments.


No comments:

Post a Comment