Wednesday, March 9, 2022

Algorithms to study: FB | Google | Amazon | More | 2020 New graduate looking for FANG jobs

March 9, 2022

Here is the link.

Offers from Google L4 | Facebook E3 | Microsoft L60 | Amazon SDE1 (Experience)

Last Edit: April 1, 2020 4:48 AM

42.3K VIEWS

I would like to share my experience interviewing with Google, Facebook, Microsoft, Apple. I had a return offer from Amazon (SDE1). In the last 2 months, I took 6 phone screen, 4 onsites and got offers from Google (L4), Facebook (E3), Microsoft (L60). The TC information is at the end. I am also including my internship interview experience with Amazon.

I will try to add the equivalent leetcode questions (as many as I can remember).
Hope this will be helpful.

Profile:
MS in computer science (graduating in May 2020)
YOE : 2 before masters
Others: 1 internship at Amazon
Leetcode : 754 (E : 177, M : 451, H : 126)

Google | SDE L4 | Mountain View | March 2020 | (Accepted)

Application:
Contacted by recruiter. The position was for people with at least 2 YOE. The level will be decided by interview performance.

phone screen (45 min):
1 easy (string) , 1 hard (binary search, divide conquer) , 1 medium (string)
All 3 questions were LC questions, can be found in google's list in LC.
I felt the focus was more on basic understanding and approach towards the problem (rather than optimal solution). Bugs, incorrect syntax is totally fine as long as you can recognise them and fix it. One small note, practising coding on Google Doc can be a make or break factor. You don't want to get caught balancing braces during a LC hard.

virtual onsite:
4 technical rounds (45 min each), 1 behavioral round (45 min).
technical round 1 : 1 medium (linked list, recursion, multiple followups)
technical round 2 : 1 medium (string), 1 hard (graph)
technical round 3: 1 medium (Queue, follow-up on concurrency), 1 hard (binary search tree)
technical round 4: 1 easy (string), 1 hard (ad-hoc, minimax)
behavioral: Standard Googlyness questions (can be found online)

All questions were exact or slight variation of LC questions, more specifically from Google's list. Focus was more on optimal solution.

Leetode equvalent questions

  1. median of two sorted array
  2. Group Shifted Strings
  3. Flatten a Multilevel Doubly Linked List
  4. Redundant connection II
  5. Bulls and Cows
  6. Guess the word
  7. Recover Binary Search Tree

Decision Process:
Google has a lengthy process following onsite: hiring committee approval, team matching, executive committee approval. The time required to complete this steps depends on recruiter, other deadlines, interview performance. Mine was completed in 10 days (onsite to receiving offer letter).
For compensation negotiation, levels.fyi is very helpful. It's always best to go to them asking for way more than you expect. They generally do not take that as a negative.

Overall experience was awesome.

Facebook | SDE E3 | Mountain View | March 2020 | (Offered)

Application:
Applied for new grad position. Standrad new grad application.

Phone Screen:
1 medium (string, followup: Dynamic programming)
1 medium(array, hashmap, followup : array, hashmap)
All questions were LC questions, can be found in facebook's list. The focus was on correctness, finding optimal solution.

Virtual Onsite
2 technical rounds, 1 behavioral + technical round
Technical round 1: 1 medium (binary search tree), 1 hard (DFS)
Technical round 2: 1 medium(string, not LC), 1 medium(backtracking, multiple followup: backtracking)
Technical + behavioral round: Standard facebook behavioral questions, 1 medium (not LC, backtracking, DP question)

All but 2 questions can be found in facebook's list. There was multiple followup in all questions. My last round did not go well (partly because of connection issues, and partly because I messed up).

Leetcode equivalent questions

  1. Binary Tree Maximum Path Sum
  2. Combination I & II
  3. Valid Palindrome II & III
  4. Subarray Sum Equals K
  5. Product of Array Except Self
  6. Next Permutation

decision process
It took them around 7 business days to make decision and another 2 days for paperwork.

Overall experience was great.

Microsoft | L60 | Redmond | March 2020 (Offered)

Application:
Contacted manager over linkedIn. This was a domain specific research SDE role and did not follow the standard new grad process. Manager worked with recruiter to setup everything.

Phone screen
1 medium (BFS).
Discussion on past project, experience and domain specific topics.

Onsite
5 technical rounds. Focus was on coding, domain knowledge, system design
Technical 1 : discussion on past publication, project, domain knowledge. No coding questions.
Technical 2 : 1 hard (Trie, BFS), 1 hard (string). 1 system design. domain specific case based questions.
Technical 3 : some behavioral, past experience, research related questions. case based questions
Technical 4: 1 hard (array), 1 medium(BFS).
Technical 5: Past experience, research related questions, case based questions.

All coding questions can be found in Microsoft's list in LC. System design question a standrad question found in Grkking the System design interview.
The domain specific questions were difficult and lot more focused on how handle scale.

Leetcode equivalent questions

  1. Trapping Rain Water
  2. Regular expression matching
  3. Word search II
  4. Maximum Width of Binary Tree
  5. Shortest Path in Binary Matrix

Decision Process
They took 10 days to make a decision and sending an offer. This is strictly my personal opinion, but the negotiation process was not a great experience (lowballing with level, compensation, asking/hinting repetitively to sign).
Overall experience, mixed. (Team/engineers: great, recruiting process: not so much)

Apple | ML Engineer | Seattle | March 2020 (Passed)

Passed phone screens, Onsite was scheduled. But I had to cancel it.

Application
Contacted Manager over linkedIn.

Phone screen 1
1 medium (string), 1 medium (BFS). one ML case based question.
The coding questions can be found in Leetcode's top 100 questions.

Phone screen 2
This was focused around ML, no coding questions. ML questions were difficult and the interviewer went into details of each concept. Discussion around past experience, project, publication.

After 2 phone screen and another call with manager, they decided to schedule a onsite.
The overall experience was very very bad. Each phone screen was followed by a prolonged silence from recruiter. Because of that it took nearly 3.5 months to just complete 2 phone screens. Which is just ridiculous. I would have preferred to get rejected early on rather than continuing with this mess for so long.

I also, interviewed and got rejected from these companies/roles:

  1. Facebook | Operation research scientist | Onsite reject
  2. Stripe | new grad | Onsite reject
  3. Bloomberg | new grad | Onsite reject

Stripe | new grad | Bay Area | October 2019 | Rejected
Application:
Applied through career page with referral.

Phone Screen:
1 extremely easy question related to custom sorting.

Onsite
3 Technical rounds, 1 behavioral round
Technical round 1 (Integration interview) : Use an HTTP library to implement some HTTP request testing. Clone a Git repo. It will contain couple of JSON files with HTTP request information, query information and expected response. Design the request and response functionality and check correctness of your implementation. I messed up in this round.
Behavioral round: Questions on past experience, projects, future goals. Standard behavioral questions.
Technical round 2 (Coding interview) : 1 easy question (similar to optimal account balancing, if you are not asked to do it optimally, i.e. the total number for transaction need not be minimum. Followup : optimal account balancing)
Technical round 3 (Bug squashing) : Clone a Git repo. It will have two/three bugs. You have to fix them. I fixed one and identified the source of the second bug but couldn't fix it.

Stripe is known for their unique interview process. I knew about the rounds and what kind question will be there, but still they caught me off guard. It's because there is no way to practice the integration and bug squash interview. The only weakness in their process is they don't have too many different questions and have limited number of tricks (but damn, they were good).

Amazon | SDE Intern | Seattle | March 2019 | Accepted
Application:
Carrer page with referral.

Online assessment:
Amazon sends 2 online assessments (OA) for internship. One OA includes 2 coding questions and another OA includes 6/7 debugging questions. To my knowledge, people solving more 4 debugging questions and 2 coding questions are safe.

Phone screen:
This is the final round for Amazon SDE intern role. Usually 1/2 questions. I was asked:
Number of islands
LRU cache

Decision Process:
I got result within 1 day. Generally, Amazon has a 5 business day response policy.

Interview process was pretty streamlined.
Amazon does not have the greatest recruiting team and it takes a while to get a response. Probably because they hire so many SDEs. Also, you generally don't have any control on team selection or project.

Preparation
I would love to share more of my experience and process. But, there is a lot of great preparation/experience posts on Leetcode, reddit and more importantly, I am too lazy to write. But, here's something I understood in this process.

  1. Preparation is very subjective. Posts/guidelines are often not very helpful and unintentionally misleading. (yes, I see the irony here). If you are new to interviewing, it would be best to assume the first 2-3 interview you give will go horrendously bad (true story). But, that experience will allow you to finetune your process.

  2. Most (or atleast FAANG) companies will ask questions from Leetcode or slight modification of a leetcode question( > 90% in my case). The only way to mitigate risk is to increase the number of question you know or have solved before. It's better to solve 800 LC questions than to trust your problem solving skill over phone in a 45 minutes window or in a cold conference room with a bunch of strangers staring at you. Company specific lists are a better option. Company specific lists can be found in section 'Companies' in Problem page (if you can afford leetcode premium, it's worth it).

  3. Praticing interviewing over phone, virtual is important. So, something like Prmp can be very helpful. (Prmp offers free mocks). For onsite, if you have the luxury you can apply to 1/2 companies that you have no intention of joining or you know you won't get. This gave me a chance to adjust with travel, interviewing continuously for 3-4 hours (Note: May be considered unprofessional)

  4. In most cases, luck is a make or break factor, your skill may not matter. In a FAANG internship interview, one guy was asked a single question : "Two sum", another guy was asked "AVL tree". This kind of messed up things happen all the time. I am pretty sure, if I am interviewed again I may or may not pass all the interviews. I just got lucky. The only way to deal with that is same as point 2.

  5. If you need to use different languages for different interviews (in my case, ML interviews expected python and I prefer C++ for SDE interview) dedicate time to context switching. This might cause issues if you are not very comfortable with continous context switch.

TC information
TC includes base, stock (first year), sign-on bonus, performance bonus
Google L4 (MTV) : base 155K, TC : 325K
Facebook E3 (MTV): base 123K, TC 240K
Microsoft L60 (Redmond) : base 118K, TC 210K
Amazon L4 (Seattle): base 112K, TC 152K

googlefacebook offermicrosoft


March 19, 2022 - I like to take some time to prepare my own notes. 

My notes - I like to review those algorithms quickly:

  1. median of two sorted array
  2. Group Shifted Strings
  3. Flatten a Multilevel Doubly Linked List
  4. Redundant connection II
  5. Bulls and Cows
  6. Guess the word
  7. Recover Binary Search Tree
  1. Binary Tree Maximum Path Sum
  2. Combination I & II
  3. Valid Palindrome II & III
  4. Subarray Sum Equals K
  5. Product of Array Except Self
  6. Next Permutation
  1. Trapping Rain Water
  2. Regular expression matching
  3. Word search II
  4. Maximum Width of Binary Tree
  5. Shortest Path in Binary Matrix
Create a public list on Leetcode.com using my account. I did like to review and code carefully the algorithm called Recover binary search tree, Leetcode 99. 

No comments:

Post a Comment