Google India | Onsite | L4 | Offer
Anonymous User
2527

This is my way of giving back to the amazing community at leetcode gm

yoe 4+
Language: Java

My Preparation
1 month prep
Leetcode 70 questions 20 general, 50 from google questions asked in last 6 months LC. almost all I practiced were medium and hard

Learnings

Questions

  • Some questions dont have a single correct answer. They are open ended. Interviewer would like to see how you think of the problem and explaining why a solution you think of wont work will also be helpful
  • When you hear question, try to brainstorm edge cases and extent of problem for some time (approx 5 min)
  • Write test cases in start so you are clear of problem
  • I was asked to prove why the provided solution is optimal, so be crisp in your explanation.
    • I used to take a min to formulate argument and then say it aloud
  • Practicing leetcode really helped me in two aspects, it gave confidence and almost similar questions were asked
  • Mock interviews really help. It helps you understand where you get stuck in the interview process.

Coding

  • Practice coding without editor and try to follow the google style guides whenever possible
  • Create structs instead of using arrays to keep code clean and readable
  • I was pointed out for using List instead of Collection, but could be one of case but better to keep in mind
  • One of the questions asked was related to bytes and messed up a bit in byte operations in java
  • The coding editor provided is simple but helps you with braces and indentation, rest is yours
  • I wasn't asked to run the code but prep in a way that your code runs without any errors, since interviewers are very fast to point out
  • Make it a practice to read code and find errors before you say you are done.
    • In leetcode, you can do same before running the code for first time to practice
  • Prep to solve questions in 30 min on leetcode

Overall Interview Discussion

  • I am generally more talkative, so i used to take breaks and ask if i am thinking in the right direction to the interviewer if interviewer doesn't speak for 5 min. Not sure if this is good or bad so use your own judgement
  • Sometimes interviewers can get stuck on a solution, Do not get hyper that your interview is screwed. One bad interview is not always a bad sign, they will account for it. Keep calm and try to do as good as possible. The game is to be flexible

My Rounds: (Not sharing question details due to NDA )
Screening round
It was a simple question related to a LC medium in google list. The follow up was a open ended discussion and I had to prove why a brute force O(n) solution will be needed and logn binary search wont work.
Overall good round.
Got postive feedback in all aspects and decided to move on for the onsite. All the 5 rounds were scheduled in span of 3 days almost 20 days later

Coding round 1
Slight variation of LC hard problem. But I missed asking about variations to the problem and hence feedback was that I "overlooked some parts of the problem", but it is normal if you can work through solution. There were two follow-ups solved both quickly and coded for them
https://leetcode.com/problems/russian-doll-envelopes/

Coding round 2
This started with a java vs python discussion and we did some library coding for Iterators (almost like LLD) in java. I didnt understand the question properly as I misheard it. wasted like 5 min in that. My solution was working but minor errors. The way of writing code was something that interviewer didnt like, He asked me to clean up the logic, though I didnt understand what to clean up and told him so. Overall average feedback due to errors pointed by interviewer

Coding round 3
This I messed up. But had to do some mathematical calculations to prove bound of solution. It was similar to finding smallest missing positive integer in array.
https://leetcode.com/problems/first-missing-positive

Coding round 4
This was a simple greedy LC medium. Followups were also simple.
Similar to https://leetcode.com/problems/task-scheduler/

Googlyness

  • Behavioural round
  • Prepare general incidents from your current work. Your recrutier will share ample resources usually that is enough.
  • I'd recommend to write (or atleast speak aloud) your answers so you are crisp and sound confident
Comments (5)