Friday, May 7, 2021

Leetcode discuss: Interview | Amazon, Apple, Facebook | L5, ICT4, E5 | Seattle | April 2020, May 2020 | My 60 minutes study

May 7, 2021

Here is the link. 

Amazon, Apple, Facebook | L5, ICT4, E5 | Seattle | April 2020, May 2020 --- Offer, Offer, Offer
1.3K
Anonymous User

Background: I am a Senior Software Developer in Microsoft. I work in the Azure cognitive services area and absolutely love my work. I have 9 years of development experience and 3 years of Sys admin experience. I have worked in many different teams and products. I started my development career as a device driver developer at Intel, moved to Sql server at Microsoft (didn't like it), then to Content Management Services and then to Cognitive Services (AI). I also had a brief stint at Lyft (7 months. Hated it.)
Current TC: $170 K. It is low and I am trying to fix it.
Quite a few people asked about the offer details.
Here it is:
Amazon: 150 base, signing bonus 68K, Stock: 140 K, vested over 4 years
Apple: 190 base, signing bonus 85 K, Stock: 450 K, vested over 4 years
Facebook: 195 Base, signing bonus 50 K, Stock: 500 K, vested over 4 years

Amazon:
Phone Screen: One take home challenge.
Onsite (Video Conference):
Round 1: All leadership questions. Conflict resolution, ownership and other things.
Round 2: A little about leadership. Design a service for sending notifications when a stock price changes.
Round 3: Leadership Questions. Coding question: Given a quantityDict, priceDict and orderDict, you need to return the total bill and update the quantityDict. Partial fulfillment is allowed.
Round 4: Canned leadership questions. Coding question: count island problem given a matrix. The island could have invalid input and you could move across diagonals as well.
Round 5: No leadership question. Coding/Design question: Implement a function which takes an artist and a song as input, updates the song play count and play the song. Also implement getTopSong function which takes an artist as an input and returns the top song.

Thoughts

The technical part of the interview was a lot easier than expected. This should have been a red flag. I was offered a L5 position when I was expecting a L6 offer. I told the recruiter that this offer and compensation is not only lower than my current comp but also lower than the average compensation at L5. The recruiter never got back to me after that.


Amazon interview was boring. They kept asking the same leadership questions. Some interviewers read the questions from a document. I was expecting to be challenged and was thoroughly disappointed. Overall, I neither liked the interview nor the interviewers. The product was not impressive. By the end of the day, I had already made up my mind to pass Amazon if offered. The compensation helped me to expedite my decision.

Apple
Phone Screen: I went to Apple through Triplebyte and skipped the Phone interview.
Onsite ( Video Conference ):

Round 1: Given a Tic Tac Toe board, verify if a player has won the game. The question was a little vague but not difficult. I solved it easily.

Round 2: You are given a grid with random characters. You are also given a dictionary. You need to find all the words that you can create in the board. The words can occur multiple times. You can go up, down left and right in the board. Return a dictionary with words as key and the frequency as value. This was a mix of coding and design question. I was asked to write Pseudo code and then design the API. This question was vague, difficult and kept changing as the discussion moved forward.

I solved it by creating a Trie from the dictionary and starting a DFS from every character in the grid.

Round 3: This was a very interesting interview. It was a non technical round. The interview was with a PM. He told me what a PM does at Apple. He then gave me a hypothetical project. He asked me to integrate Rotten tomatoes ratings in the Siri's video response. This was as vague a requirement as you can get. He asked me how would you handle such a project.


I talked about clarifying the requirements, coming up with a definition of done, telemetry for measuring the success of the project, discussed the day to day details in the development phase. We discussed about involving stakeholders, setting up a standup, unblocking the stakeholders, resolving conflicts and managing expectations.


In the last 5-10 mins, he asked about a fantasy project I'd like to do. I discussed digitization of smell and touch.


Round 4: This was a technical round. I was asked to implement a dictionary. This was a vague question and we discussed various things such as hashing function, collision resolution, load factor and dictionary expansion once it becomes too full. I implemented a Generic dictionary in C# using List.
His last question was about a feature that I'd like to implement in a hackathon. I suggested that maps turn by turn direction shouldn't give direction for known routes.
Round 5: Implement an IsPalidrome function. He actually executed the code on quite a few inputs. There were many edge cases but how hard IsPalindrome can be? He then asked me to implement a function which which takes a string as input and returns a score based on how different it is from a Palidrome. This was a vague question and I interpreted it as how many inserts and deletes will it take to covert a string to a Palindrome. I proposed a DP solution. The interviewer wasn't sure if it will work but I knew it will. I have done several variation of this problem.


Round 6: This round was with the manager. We talked about leadership, projects, the team's charter, Apple's culture, tech stack, compensation, career growth and many other things. This round was about me interviewing the team and company.


Thoughts: I was mighty impressed by Apple's interview process. The focus was not on Leetcodish questions but on general Software development. The team was diverse and very pleasant. I stumbled a little bit on the Dictionary question but rest of the rounds went very well. The interview gave me an opportunity to show the skills that I have developed through experience. General software development is not about churning out code. It is about what problems to solve, why do you want to solve that problem and how do you know that you have solved the problem well. You go to the code writing phase only you have answered these questions satisfactorily.
I was offered the position a few days later. The numbers are almost the same as a Facebook E5 offer. I said yes on the spot because I really liked the interview.

Facebook
Phone Screen Find the number of subsequences such that min(subseq) + max(subseq) == k. I was able to finish it quickly but missed one edge case. The second question was min(subSeq) + max(subSeq) <= k. This was an interesting problem and I missed one edge case again. I was able to solve it with a hint but found the problem challenging because of the edge cases. Damn the edge cases :)
Here are some helpful links for this problem:
https://leetcode.com/discuss/interview-question/268604/Google-interview-Number-of-subsets
https://leetcode.com/discuss/interview-question/275785/facebook-phone-screen-count-subsets

Onsite (Video Conference):
Round 1
IsSplitPossible => Given an array of positive integers, is it possible to split the array in two parts such that the sum of parts is equal. This is a very easy problem using prefix Sum.


Merge K sorted Lists => Given k sorted lists, merge them into one lists. It is a direct application of heap (priority queue)
Round 2
Kth largest number in an array => Again a Heap question. I think I was distracted in this round because I missed some easy edge cases (e.g. k < 0)
Implement readline method using Read4k() => Not too challenging. I thought I solved it well but interviewer thought I missed a case.
Round 3
Jedi interview: All behavioral questions. Conflict resolution, impact blah blah blah. I am not sure how well I did. I am never sure how I perform in a behavioral interview.
Round 4
Design an image download library/component/service => This was pretty straight forward.

Thoughts: The FB interview was a typical rapid fire FB interview. The first round was done in 25 mins. I found the coding and design questions to be straightforward. I missed some edge cases which is a little disappointing for me. I usually implement a ValidateInput() for every top level function I write in an interview. This is a heuristic I have developed to avoid such stupid mistakes but I missed it this time.
I got the offer in a week. The offer is almost the same as Apple. I am mostly likely going to pass the offer.


I have mixed feelings about FB. They don't give you much time to ask questions but their interviews are quick. The pattern is mechanistic and focus too much on leetcodish questions but I don't mind that. 

FB offers probably the best compensation in the industry but I am not sure about their code quality. I have worked with FB graph APIs as part of my work and these APIs are inconsistent. The GET response is entirely different from the POST body for the same resource. You can reply to a comment using the Graph API but the FB UI doesn't show them (Talk about side effects). It felt like the GET and POST APIs are developed by two different teams and they don't talk to each other.


I talked to a few friends at FB and I got an impression that FB has a cut throat work environment and the focus is more on speed (which is called Impact). Somehow, Facebook has a brand of the best engineer talent and culture in the world. I am skeptical about that. I think Google, Netflix and pockets of Amazon and Microsoft has exceptionally good engineering culture but I am also skeptical about my own opinions :). I am prone to Cognitive biases just like everyone else.

Preparation: I am an anamoly when it comes to interview preparation. I didn't prepare for the interviews in the traditional sense. I love to solve algorithm puzzles and a voracious reader of all sorts book (including technical ones). I have been doing the contests for last few weeks and absolutely love them. I have been doing leetcode on and off for last five years. When I started leetcode, it only had 80 questions :). One can say that I am always in preparation mode but that will depend on your definition of preparation.


For design, I have studied the now famous "gr-okking the System Design Interview" course. It is a good course but once you have solved the first four five questions, you notice the pattern and you can apply it to solve other problems. It focuses too much on the Scalability aspect of cloud(ish) services which are exposed through REST apis. If you have studied only this course, you will stumble if asked about other types of design problemes. My manger (amazing guy) likes to ask a compiler question during interview. He asks people to design the Type system of a modern language such as C# or Java. You would struggle to answer this question satisfactorily if all you have done is Leetcode or gr-okking the system design.
Here is what I have done in last 4-5 years.
Leetcode: 500ish questions
Hackrrank: 200ish questions
Project Euler: 100ish
gr-okking the Coding interview
gr-okking Dynamic Programming Patterns
Cracking the coding interview
Elements of programming interviews in Python (have done only a few problems)
Algorithmic Puzzles (only a few problems)
Programming Pearls (bought the book but never read it)

Design:
gr-okking the System design interview
Highscalability.com
Several youtube videos about different systems

I also host a learn session in my team where we talk about various technologies and patterns to solve problems. Sample discussions are NoSql (Cosmos DB), Deployment, Security (OAuth), Service Topology, NLP etc. I have signed up for countless udemy courses but finished only a few.

My learning has been organic and haphazard. I absolutely love the field of Computer science and Software development. There is no area of CS which is not interesting to me. I have been lucky enough to find a profession which matches my hobby. No matter where I work and how much I earn, I'd strive to learn more and become better at my craft.

Takeaways: India has an elite set of colleges called IITs -Indian Institute of Technology. You have to take a dreaded standardized test called JEE - Joint Entrance Examination - to get into any of these colleges. Kids start preparing for JEE long before taking the tests. It is a ruthless examination. You are ranked based on your score. It is an efficient process for eliminating candidates but crushing for the participants. A lot of students are burned out by the time they get into the college and lose all interest in studies. It also takes a heavy psychological toll on the unsuccessful candidates.


The interviewing process is turning into a JEE exam. The focus is on getting into one of the top companies and hope for the best. This is unhealthy. Computer Science is a fascinating field and Software development is lot more than writing code. I urge all of leetcode participants to look beyond algorithms and be curious about software, systems, life and other fields. It may sound counter productive but you will be a better and happier developer if you study other fields such as Math, Medical Science, Philosophy, History and Literature. Try to enjoy the process and stop comparing yourself to others. Failing interviews don't make you a failure. Clearing interviews don't make you a hero. By all means, strive for the best but keep it in perspective. There is shitty code at Microsoft, Facebook, Google and Netflix - I am not sure about Netflix though :) There must be beautiful code in the systems of Target, BBC, Epic Systems and Wikipedia. No one has a monopoly on excellence. Reach for excellence. Everything else will workout fine in the end.
If you read till the end then I am thankful to you. I encourage you to share your perspective in the comments.
Good Luck !!

Edit:
I am really happy that many people found my post inspiring. I try to read every comment but I may not be able to respond or advise. I don't have enough time. I'll send an e-mail and my LinkedIn profile if you wish to connect but please maintain my privacy. I am still employed full time and would like to keep the news of moving out a secret until an opportune moment.
To my fellow engineers out there, don't read too much in my story. As I have said in the post, my growth has been haphazard. Don't follow it if you are looking for an optimal result. If you want to enjoy the journey then focus on your walking style, not your path.

facebookamazonapple
Comments: 155
sp33d's avatar
Read More

Great perspective on important things:

  • Failing interviews don't make you a failure. Clearing interviews don't make you a hero.
  • There is no area of CS which is not interesting
  • strive to learn more and become better at my craft
  • No one has a monopoly on excellence. Reach for excellence
  • Software development is lot more than writing code
  • I am also skeptical about my own opinions :). I am prone to Cognitive biases just like everyone else

Thanks for your honest and informative post, enjoyed reading it till the end. Technical skills apart you are a great story teller too.
Great posts like this are the reason I love the LC community!

221
Hide 4 replies
Reply
Share
Report
bruhWhat's avatar
Read More

Would love to get connected over Linkedin! Would be grateful if you could share your LI credentials.

0
Reply
Share
Report
Lavish_5422's avatar
Read More

can we connect on linkedin,can you pls share your linkein profile with me ,or you too can send methe request ,my Linkedin profile is there in my Linkedin profile.

0
Reply
Share
Report
Anonymous User
Read More

Thanks for the compliment :)

0
Reply
Share
Report
ctci07's avatar
Read More

good summary and quotes.. super!

0
Reply
Share
Report
wewewerwerfg's avatar
Read More

"The interviewing process is turning into a JEE exam" Agree 100%. They do this in south korea too and it's harming the economy. Nobody wants to do a startup or join a small company, everyone wants to join a big established company like Samsung and think they have failed in life if they don't. Crazy

45
Hide 5 replies
Reply
Share
Report
nero7s's avatar
Read More

@bmikaili But it is not like that you think. There are also cultural things you need to take into account. South Korea is not like that. Even Samsung, LG are big IT companies, their work environment is not good compared to other IT giants.

0
Reply
Share
Report
bmikaili's avatar
Read More

Why is it crazy? Better work environment, better pay, better career prospects.

0
Reply
Share
Report
nero7s's avatar
Read More

I work in South Korea. These days, I am looking for new job these days. Problem I am facing is that companies need candidates who meets all requirements in their JD. And also, cultural differences. Most of the companies in SK, don't want cultural diversity and organization is based on vertical management and palli palli culture ))) (too conservative). Startups may change this culture, I hope.

0
Reply
Share
Report
sea0920's avatar
Read More

Gotta love this JEE part. Why do schools/companies make people waste their time, doing something useless outside of admission/acceptance?

0
Reply
Share
Report
hankijooit's avatar
Read More

Can vouch for that, I myself is working for big companies. But how did it CS Interviews evolve to this level? I don't think it was like this when I started my career 6 years ago.

1
Reply
Share
Report
jiamingjiang's avatar
Read More

Thanks for the post! The interview prep process is making me forget why I studied CS in the first place. Your words really encouraged me.

44
Reply
Share
Report
sreeramb93's avatar
Read More

There was an interview post about someone calling Google interview process an IIT JEE exam. with a 12 month cooloff

23
Hide 1 reply
Reply
Share
Report
megatron99's avatar
Read More

Yes. There are a lot of similarities.

1
Reply
Share
Report
jayashree_nagarajan's avatar
Read More

Great post! I am fairly new to leetcode community and I have been a passive absorber of information here so far, until now...reading your post - especially the takeaways in the end, I was compelled to post my thoughts. I couldn't agree more to the point you make about how competitive coding skills have become. I absolutely love Computer Science and problem solving (broadly speaking) but with growing pressure on mastering leetcode problems is slowly making me think about moving out of CS and explore an alternative career. I've never been a big fan of getting into top companies just for the sake of it but after several layoffs and instability in my career recently, I'm compelled to follow this rat race hoping to get somewhere stable. This is unfortunate and I was so happy to finally find someone write about it that resonates with what I feel about this artificially bloated competition. Thanks and all the best in your career!

13
Hide 3 replies
Reply
Share
Report
gatekeeper19's avatar
Read More

Stable? Job stability is an illusion in any company, big tech companies are not charities, they're there to make profits for shareholders. They wouldn't think twice before dismissing a team that's unprofitable.

0
Reply
Share
Report
ekbabu's avatar
Read More

Try to do 1 LC problem - start with easy one - every day. Try for at least 45 days and you will start noticing that you are slowly getting better.
Hang in there. Don't give up and All the best.

1
Reply
Share
Report
hortencialopes's avatar
Read More

couldn't agree more!

0
Reply
Share
Report
leomon38's avatar
Read More

The Takeaways also similar in China....
I am 40+ and now I am starting my new path as SDE.. Kinda tough. But I surf leetcode for the inspiration articles just like yours

12
Hide 4 replies
Reply
Share
Report
contacttoakhil's avatar
Read More

@SwissTaco I also started my career at 28 after a long struggle and now I am around 40 and doing just fine. Though I must accept that now when I would be 40 in some time things are getting tough due to lot of peer pressure and young folks.

But I believe in optimism and am trying to learn more about architecture and stuff which makes experienced folks like us value-able. So my friend "Better late than never!"

1
Reply
Share
Report
SwissTaco's avatar
Read More

I am 30 and finishing my last year of a 2 year diploma... I am considering if I should take another 2 years at a university to get an actual BCS or just wing it and start working to gain experience. Career changes are hard, especially into this field. There is almost none of my previous experience that I can apply to this sector (I was a security guard and telecom technician before this), so I know how hard it can be to start from scratch, plus the disadvantage of being "older".

That said, I also think it's something you could use in interviews. It shows you are very committed and hard working, and constantly striving to get better. Nothing proves this more than taking on an SDE path at this age. Good luck!

0
Reply
Share
Report
skchalla02's avatar
Read More

I am 35 and started the same journey. I am with you! It needs a lot of perseverance.

0
Reply
Share
Report
Anonymous User
Read More

I admire people who have courage to start a difficult field at a mature age. It takes a lot of perseverance, optimism and a pretty thick skin to do it. I salute you.

6
Reply
Share
Report
ethan-marsh's avatar
Read More

Hahaha "interview prep: bought the book but never read it" is great 😂

9
Show 1 reply
Reply
Share
Report
ctci07's avatar
Read More

This is one of the best posts i have ever read. I agree to all the things you have mentioned. Particularly - " I have been doing leetcode on and off for last five years. When I started leetcode, it only had 80 questions :). One can say that I am always in preparation mode but that will depend on your defintion of preparation." and "The interviewing process is turning into a JEE exam. " are the best. I too work in msft. If you are in Redmond, I would like to get in touch. Pl let me know.

9
Hide 5 replies
Reply
Share
Report
vinaycn's avatar
Read More

can you also send me an email to cnvinay25@gmail.com ?

0
Reply
Share
Report
ctci07's avatar
Read More

Thank you.. Replied to your email and sent you request on linkedin.

0
Reply
Share
Report
Anonymous User
Read More

@ctci07 Sent you an e-mail

0
Reply
Share
Report
ctci07's avatar
Read More

Can you pls send me an email on mangeshshikrod [At] gmail. I will send my linkedin profile on email.
Sorry, may not be a good idea to post my actual linkedin account here as this is a public forum.

0
Reply
Share
Report
Anonymous User
Read More

Sure. If you share your LinkedIn profile, I'll add you.

0
Reply
Share
Report
_underdog_'s avatar
Read More

Great post! I echo lots of what you said. Congratulations on the offers :)

I don't see LC question on this - "Find the number of subsequences such that min(subseq) + max(subseq) == k. I was able to finish it quickly but missed one edge case. The second question was min(subSeq) + max(subSeq) <= k"

@OP - Where can I find it? Else: How did you solve this?

5
Hide 1 reply
Reply
Share
Report
thasan08's avatar
Read More

Great post and congratulations, your current TC is criminal to what you should be making! Anyone know if the fb phone screen and first round question is on leetcode?

Edit: found first round question

5
Hide 1 reply
Reply
Share
Report
MaratKhakim's avatar
Read More

I think it is this second question

No comments:

Post a Comment