Wednesday, May 2, 2018

Being an interviewer: Leetcode 152 Maximum product subarray

May 2, 2018


It is so interesting to work as an interviewer. I did interview a ICPC contest silver medal winner, facebook intern using the algorithm a few days ago. And today I had chance to interview a 15-years professional software engineer.

What I like to do is to tell the difference? How to approach the goal to be a super talent programmer? Experience, education, what is most important part to play the role? We can not tell, but we can do tell through problem solving on the algorithm related to dynamic programming problem.

Mock interview

Here is the transcript I reviewed.

Two stories to give out major hint of dynamic programming idea 

The subproblem is to define the subarray ending at index i, what is maximum subarray product? Why is this subproblem defined? Since it can be constructed in the series of index i, and easy to do it. Our solution is to get global maximum value for each index i.

But it is not easy for me to teach or tutor the candidate in mock interview on this idea. Basically it is not good idea to tutor peers on mock interview. But sometimes I have to learn how to give major hint, how to define the hints to make it easy for the peer to understand.

I tried on my last two mock interview but I did not do very well. Here is more detail story.

Learning to be a good interviewer is so much fun. I did talk to the peer on mock interview, while the peer worked on the test case and tried to understand my hint, I was surfing Leetcode 152 discussion, and see if there is any tip for me to share with the peer. I could not believe that the peer could not understand my hint, and let him try a few more times to get the solution by himself. Actually he could not do it.

The same thing happened a few days ago with the peer who has much strong analysis skill set. He did say that he understood my hint. But then he moved on to explain his original idea and made a few modification. I could not understand his idea fully, but he showed no interest on my hint.

Learning the algorithm together is so much fun. It is not easy, specially for people over 10 years experience but lack of constant challenge on algorithm and data structure.

I have to learn how to encourage the peer, make him less stress and get out comfortable zone to try something new.

No comments:

Post a Comment