Interview Prep for FAANG

I think I have always been embarrassed by an interview I had with Google when I was fresh out of college. I choked on a simpler problem (now that I look back on it).

Exhausted from the 8-hour final interview day, in the last round, I was asked to solve a problem involving determining the coordinates of an array of heights that would hold the maximum amount of water, if I remember correctly. I just choked, and once I believed I wouldn’t be able to find a solution, panic set in, and it became a reality.

Lesson learned there: Keep calm. Think. Talk. Do whatever you can to try and move forward. Who knows, maybe I would have even gotten some help if I hadn’t just frozen up.

Ironically, recently my parent company was acquired, and I received a message from Meta for an interview, so I decided to give it all a second shot. Thus began the long, arduous, multi-month process of interviews and coding challenges.

I was told to study LeetCode—medium to hard problems.

Since then, I’ve been doing so, and unfortunately, since it has been years since college, where I would have learned helpful algorithms, and I have rarely come across anything at work that is useful for these LeetCode problems, I have been relying on my memory and data structure knowledge to do my best to work through problems

These problems honestly make me feel like I have no chance with this interview process. I have heard that in the first interview, I can expect to solve two medium-level problems, each in 15 minutes.

Sure, I could do this with an O(N^2) solution, but I know that isn’t what they are looking for, and it honestly seems like half the problems have specific solutions relevant only to that problem.

HOWEVER, I have found myself building a repertoire of algorithms and possibly patterns that can be reused for specific problems or subsets of problems.

I was especially afraid of graphs, but actually, I solved one of these the easiest, with a decent solution compared to others, and posted it here.

When you do find that you have the right algorithm or pattern in your pocket and can identify where to use it, it’s a great feeling.

While I am sure I won’t be implementing a quickSelect algorithm (when I can use a pre-existing data structure such as a priority queue, for example) in my day-to-day work, it has been a great learning experience and a great way to keep myself challenged and learning.

Even though I will probably perform poorly in the interview, as I didn’t give myself much, if any, time to prepare, I am glad I finally added a new way of learning and staying sharp.

Instead of my usual approaches of finding projects to create, tooling to make, or applications to reverse engineer, I can say that giving LeetCode a try was a great choice.