Giving back - how I cleared L6 coding - Part 1 - Google

Edit 2: Part 1 of long term preparation strategy is out: https://www.teamblind.com/post/YA2RKEqY Edit 1: Part 2 is out: https://www.teamblind.com/post/zfa20cCc So I'm back. I have a different username but it's me (you can confirm by looking at the SD part 1 post). I decided to give in to the multitude of people asking for coding help and I will pause part 4 of system design. I promise I'll eventually do it. Enough of this. I won't repeat my intro, see my SD part 1 for that (https://www.teamblind.com/post/4yufM3RY). Long story short is I cleared pretty much all the bigs at L6 level and now I'm giving back to Blind, which helped me while I was preparing. For coding I used different strategies for Facebook and a different one for others. This part will be about the 'others' and that's represented by Google. My target was L6 and I have no idea how this compares to lower levels. I have heard though that as you go up the levels coding starts to become less important than System Design. However I didn't really consider that and I prepared for a hardcore coding interview anyway. Before going into depths I want to flag something which is valid for pretty much all technical interview preparations. I believe preparing for an interview (for anything really) is ultimately a fight with yourself. Your lazy self tells you that you understand a solution while in truth you really don't. Your lazy self tells you you can easily solve it and don't have to actually write the solution, while you really don't. Learning to keep a good leash on this 'lazy' self is the key to making this work. Being honest with yourself about what you really know and you really don't know is half the job. Now let's press zero on the elevator and go to ground level stuff. You'll need leetcode. I only used that one. You'll need premium. You can't afford it? Take a mortgage. For Google don't expect to get an I've-seen-this-before problem. You'll have to improvise. Go to LC, go to Problems section, scroll down and on the right pane there will be Topics. Pick one, say Arrays. I used acceptance rate as a better indicator of Difficulty than the actual difficulty rating. Start picking an easy one with non-blue Frequency rating. Once you solve that one, if there is a 'Related question' go and do those too in increasing order of Difficulty tag. Which Topics do you do? Pretty much all with a number bigger than 20 on them, except Math. I didn't do Math. I think it's a waste of time. Did your heart sink at the thought of doing them all? I mean 'visit' all topics until you're confident, not do all problems there. If you're really pressed for time I recommend Arrays, DP, Backtracking, Two Pointers and Sliding Window. If you're further pressed for time then just do Arrays, DP, Two pointers. If you're further pressed for time then stop reading this post and get back to LC. Now I mentioned 'solve' in the above paragraph. Agile fanboys like to talk about the 'definition of done'. In the same vein, let's talk about the definition of solved. This is really key. If you don't get this part right you're wasting your time. There are various ways you can consider a question 'solved'. Number one is you see the problem first time, you sit down, spend 10 minutes or 2 hours whatever, write the code and you get it accepted . Hands down solved. Great job. Second best is this: you sit down, you try you can't solve it. If you jump to 'Solution' tab I'll drag you by the hair back to the 'Description' tab. Was that too violent and graphical? Good, that way it sticks and you remember it more easily. More seriously, I suggest you to go through the hints. Almost all problems have hints which you find if you scroll down right after the problem definition ends. Show hints one by one and try to solve it with the hints. Show hint 1, try to solve; Show hint 2 try to solve etc. Third best: even after hints you're still lost. Now you can go to Solution tab. Read approach 1. *Understand it*. Go back to Description tab. Now code Approach 1. Same with approach 2 and 3 etc. It is important to not code while reading the solution. It will feed your lazy self. Listen, reading the solution and shaking your head pretending you 'knew it but yeah writing the code is beneath you' is Strong No Hire Burn with Fire material. Not only you will fail but you'll make a fool of yourself. Either do it properly or go away. Hoping you got my point here, I'll move on. Once you feel ready, you'll need another couple of weeks. I'm serious. Go to Interview tab in LC, and choose Assessment. You'll have to do 10-15 assessments. You can choose between Phone Interview and Onsite Interview on the Google section. Do those properly. Set aside the uninterrupted time. This is *extremely* helpful. The reason is that it gets you used to the time pressure. Time management is a key thing in these things. So you'll need to practice working under time pressure so you don't pee your pants during the real interview. It's better to go through those phases in mock assessments than in real interviews. Do at least two per day. If possible time at least one of them at the exact time of your interview. I'll finish this part with a discussion on morale. At times you will feel dumb, you will feel hopeless, you will feel not worthy, you'll feel not genius enough, you'll feel "I can't even do this easy one", you'll feel you'll never make it and you're wasting your time. Let me tell you that the ones that cleared these interviews are the ones that didn't let themselves get demotivated by these thoughts, not the born geniuses who can solve LC Hards with their toes. It is what you do when the morale is down that determines whether you make it or not. The rest are Hollywood fantasies. So pull yourself together, focus and keep going. Exactly here, where everyone else gave up, you push through - that's how you win. Stop crying to mommy, sit up straight and get the job done. This is it for Part 1. For Part 2 I will talk about the interview day, how to manage the time, logistics and more. Good luck.

Add a comment
CitiusTech TLLl23 Jun 22, 2021

As an L6 level, what you day to day work at Google will be like?

BD MjLb41 Jun 22, 2021

If I remember correctly open has chosen FB, of course she/he got google and few other offers.

Red Hat flung2 OP Jun 22, 2021

I’m a guy.

Bank of America ascendant Jun 22, 2021

Thanks so much for giving back dude. You’re doing God’s work!

Uber Taxless Jun 22, 2021

God's work is giving back?

Red Hat flung2 OP Jun 22, 2021

You’re welcome. God says Hi.

VMware uSQF23 Jun 22, 2021

Good job dude.

Singtel bobmarle Jun 22, 2021

This is gold among the zillion shit posts you see on blind. Thank you 👍

Target cPNV16 Jun 22, 2021

waiting for part 2......

Red Hat flung2 OP Jun 22, 2021

That was fast. Start with Part 1.

Apple Xlnv45 Jun 22, 2021

One thing that I've noticed is that looking at the most optimal 4 line solution doesn't help much. You want to look for a pattern that spans multiple problems of that type. For example DFS and BFS are very specific patterns that span trees and graphs problems. Often the most insane 5 line solutions aren't obviously applying these patterns and you need to study the more verbose solutions to pick up on them, because the pattern as applied before any optimizations is what you need to learn first.

New
goatcandy Jun 22, 2021

I 100% agree with this. You wrote what I was thinking but never put pen to paper. The short solutions might be easy to memorize, but if you don't understand them you'll get undressed in an interview - because they're usually really really hard to come by unless you understand deeply the more verbose solutions. This is actually a problem I have with LC in general. Lots of times the optimal solution will be like 3-4 lines and they'll mark it an LC medium and other solutions that are multiple functions, hugely verbose, etc marked as hard. When in reality, it's got little to do with the amount of code and everything to do with the glacier underneath the water below those 4 lines.

Dodge LLAA68 Jun 22, 2021

Cheat solution is great as long as you can explain it and your interviewer is smart enough to understand it (most probably don't).

Amazon uhkqo Jun 22, 2021

Great work OP. Excellent post đŸ€—đŸ’ŻđŸ’Ż

Airbnb opcw52 Jun 22, 2021

Excellent post . How many LC were you able to get through in your 6 month prep?

Red Hat flung2 OP Jun 22, 2021

Don’t fixate yourself on the number. According to my definition of solved, roughly 150. But again, make slow and steady progress rather than fast and empty-head one.

Bloomberg bencb Jun 22, 2021

So the only resource you used was LC? No online courses/books?

Red Hat flung2 OP Jun 22, 2021

Only LC

Google flamingo20 Jun 22, 2021

Before hitting the "solution" tab I like to briefly read the titles on the "discuss" tab. Often times the titles would contain "Java BFS" or "O(nlogn)". It can provide a very strong hint while not giving you the full solution.

Red Hat flung2 OP Jun 22, 2021

Don’t do that. Try with hints first. Go to Discuss after you have solved it. The Discuss tab has just guys who have nothing better to do than brag on LC.

Red Hat flung2 OP Jun 23, 2021

I take that last part back. Was too judgmental.