Introduction
I had this mock interview on interviewing.io, and the I noticed that the peer is anonymous but he is machine learning algorithm computer science Ph.D. with a few years experience.
Mock interview performance
Here is the transcript related to the discussion and my code written in the hurry. The code is copied from the record video at 55:01/ 1:00:16.
Highlights of mock interview performance:
Line 44: I tried to define the subproblem, what are the subproblems?
Line 120 - 128: I narrowed the subproblems to max/ min value.
After mock interview
Here is the algorithm I tried to write after mock interview, it has some bugs in there.
For example, [1, 12, -3], if we use the recursive function, then it is 1 - (12 * (-3)) = 1 + 36 = 37, but since the precedence is flat, 1 - 12 * (-3) = -11 * (-3) = 33. So we may have to process the array in reverse order instead, I have to investigate on the issue.
Here is the code from the friend I met on pramp.com.
Major hint complaint
I got feedback from the peer, the peer told me that I need major hint and also the solution is a brute force solution.
Here is the feedback I got after January 25 mock interview.
Follow up
The solution is attached here. Also I posted the question on codereview.com, and the link is here.
No comments:
Post a Comment