Introduction
It is my favorite algorithm called array quadruplet. I did talk about the analysis of the algorithm and then wrote down the algorithm without any bug and pass all test cases first time. Only thing I did is to include library using ..., I explained to the peer that I have worked on the algorithm multiple times, but one time a young lady who was preparing facebook onsite, she told me that I should simplify the code to check if dictionary contains key or not. So I only need to write three lines of code from line 57 to line 62, before I need to write if/ else and then update list in both cases.
Mock interview
Here is my C# code.
I still remembered that the first time I worked on the algorithm on mock interview platform. I had such difficult time. After I worked with over ten people on this algorithm, I followed every peer and understood how they think and analyze. So it is also very good experience to help the peer to work on the algorithm the first time. Here is the blog I wrote to give the feedback to the peer.
No comments:
Post a Comment