Thursday, June 11, 2020

FAANG : The Journey | Post 3 - Interview Experience

Note: This is not my personal experience, i just shared it out, because i liked it.. Enjoy   :) This is sort of the guide to prepare for the interview.

Hi all,

Just giving back to the community as the Leetcode community has been extremely helpful for me in my prep. I'm honoring the NDAs so not going to specify the problems, but just give a general area. Honestly, when I was going through the interview experience posts, the general area of the question helped me in a lot in figuring out what I needed to focus on learning, rather than the specific questions themselves since you probably won't end up getting the same questions in your interviews. I had my interview with Amazon first and then Google.

Status: ~ 5 YoE at a Fortune 500 not known for software lol, BS CS at a small liberal arts college
Positions: L3/L4 @ Google, SDE2 @ Amazon
Location: ~not sharing to remain anonymous~ Edit: North America
Date: June 2020

Edit: I'm really glad that this provides some insights for people. I just want to note that this is what worked for me. Maybe one bullet here will work for you, maybe all, maybe none. Just try something and if it doesn't work for you, move on. Most of my experiences here are from a cumulation of experiences of Leetcode posts from trial and error. I took snippets here and there and made a plan that worked for me :)


Amazon [Offer]

Process

  • Recruiter reached out to me in April through Hired
  • I completed the online assessment, didn't do that well TBH. Finished one problem and time exceeded limit on another so I didn't hear back. Thought my chance with Amazon was shot until another recruiter reached out to me for a different position a month later. A week later, I scheduled an onsite for June.
  • Tip: if you have an onsite with another tech company, definitely use that to your advantage. Recruiters know that good candidates will have another interview so they will help to expedite the process.

Virtual Onsite Interviews (4 rounds)
4 rounds total, 1 hr each round with 15 min break in between 2 hours

  • Round 1 (1 hr): 2 questions - both Easy in my opinion
    • 2 LPs
    • Bar raiser —> solved the first one easily and asked if I had already seen a similar problem so I said yes. He proceeded to ask another question which I was able to solve very quickly optimally and he asked if I saw this problem also and I said no because it's true, then asked a follow up question, which we just talked through my approach and I didn’t code it up. This was probably my best round
  • Round 2 (1 hr): OOD question - Medium
    • not one I’ve seen before but it was relatively straightforward. This was more focused on code maintainability
    • 2 LPs
    • Did relatively well here, in that I was able to break down the code
    • Did not fully finish implementing the code and ran out of time so I just talked through my last function, but had really good discussion throughout
  • Round 3 (1 hr): 1 question - Medium
    • 2 LPs
    • I told the interviewer I already saw this (learning from my first round the expectation) and then talked through the three different approaches. He asked me to coded the optimal solution. It went downhill when he asked me to implement the library of a class I was using.
    • With some hints, I was able to implement one of the functions from the library, but this was probably my worst round
  • Round 4 (1hr): System design
    • 4 LPs —> there were more LPs here compared to the others
    • System design question which felt more like a discussion, I could have driven the conversation more here, but when I paused to think, I was asked a question so I just answered that and the rest of the conversation went through a similar flow
    • Edit: some of you asked about whether database was included and I would say it depends on the scope of the problem. I definitely made sure to ask. This was the system design template I used when approaching the problem (I would ask at each stage if I should do it or not):
      1. ask for requirements - extremely important. DO NOT jump into designing without this first
        • functional/nonfunctional/scope
      2. capacity estimation (was asked to skip b/c not as relevant)
        • bandwidth/storage
      3. high level design
        • client/server/application/database
      4. component design - pick your best area and suggest to start there. Say something like "I could do deeper into client/server/database, but I think {INSERT YOUR BEST AREA} is a good place to start. Do you agree?" (got this from a Byte-by-Byte seminar)
      5. scale it up (I made an acrononym here to help me remember, it's a little silly but I'll share)
        • MSCANDaLS
          • Mapreduce,
          • Scaling,
          • Caching,
          • Asynchronous Processing,
          • Network metrics,
          • Database denormalization,
          • Loadbalancing,
          • Sharding

Overall Thought

  • It was fine, a little rough because it was essentially 4 hours back to back with only one 15 min break in between. I lost my voice by the 4th round and also ran out of water. Most of the interviewers except for 1 was pretty engaging throughout and friendly overall.
    • Tip: have plenty of water bottles by your computer
  • LPs (edit: https://www.amazon.jobs/en/principles) are very important. I probably spent 4 hrs+ on the phone with my recruiter going through my LPs. He definitely pushed me to ensure I have them well thought out w/ data-driven results. This helped me as I was going through LP each round b/c I knew what stories to associate with each LP.
    • Edit:
    • Tip: even before using STAR to answer your question, give the project background and the company (if you have multiple company) and who the customers are (kind of pre-situation). Additionally, ensure results are quantitative/concrete and helps the following in some way: 1) the customer, 2) improving some process, 3) the company
    • Prepared for it by creating a spreadsheet with the following columns: LP, Background, Situation, Task, Action, Result. I filled it up with LP and relavant stories. I tried to have stories from at least 3 different projects and the Background column really helped me keep track of that.
    • Practiced saying them out loud at least once and tried to memorize the results. At the end of the day, they're your stories. You're in it so you can't really fail at telling your story.
    • Here's how I phrase my answer: "Before I answer, just want to give you a background on the company & project. I was working at {COMPANY} on a {PROJECT} for {INDUSTRY/CUSTOMER}. The situation was {SITUATION} and I was assigned {TASK}. What I did was {ACTION} and as a result of what I did, {RESULT} happened. [Optional: you could always talk about what you learned if it wasn't a success story and how you applied that in the future]"
    • Important to actually answer all the questions asked

Retrospect
Right after my interview, I did a little retrospection on how I did so I remember what I did do well and what I can improve for my next interview.

What I did well:

  • communicated my thoughts clearly out loud
  • Asked clarifying questions before starting to solve the problem
  • Made it felt more like a conversation
  • Thought of it more like collaborating with a peer
  • Explained my solution and approach along with the time complexity before I started coding the solution
  • Talked about different possible approaches
  • When I got to a trickier part of the problem, I kept calm and asked clarifying questions and then carried on to a solution
  • Didn’t feel pressured for the time

What I can improve on:

  • Was a bit flustered when I didn’t get something
  • Didn’t look directly at the camera at all times
  • Could’ve gone deeper in some of my answers
  • Could’ve have used "we" more when collaborating the question
  • Needed more water

Offer
Edit: Just got my verbal offer!!! FYI, it took 3 business days before I got the call.


Google [Pending]

Process

  • Recruiter reached out to me awhile ago on LinkedIn and kept me on file so when I was ready, I just reached back out to start the process in April
  • First call with recruiter went well and at this point, I just finished my Amazon assessment so I told my recruiter that and then sent me off to another recruiter
  • After that transfer, I was told I would go straight to onsite so I scheduled my onsite for end of May, but had to reschedule to June b/c of some personal issues.

Virtual Onsite Interviews (5 rounds)

  • Round 1 (45 min): 1 problem - Medium/Hard
    • Never seen this problem before
    • Was able to come up with solution, coded it up relatively fast since I only had about 10 min left. Asked follow up and was not able to code that up but very quickly discussed the solution since the next interviewer joined early.
    • Had fun working through it with my interviewer. Since it was my first interview, my interviewer definitely tried to help me relax which I really appreciated.
  • Round 2 (45 min): 1 problem - Easy/Medium
    • Never seen this problem before, believe I was able to come up with an answer (I think it's most optimal, but unsure)
    • The interviewer asked me how I would test it, I said pretty much all the edge cases I could think of and after the interview, realized I forgot the edge case for index out of range. I was so mad at myself, but tried to remain positive for the rest of the rounds and not let it affect me.
  • Break (1 hr)
    • This was really nice break. I ate a light lunch, english muffin and almonds lol. I wanted to nap but knew I wouldn't be able to due to excitement so I went for a walk instead to help clear my mind and frustrations which I think helped me in my next rounds. I also re-caffeinated because afternoon is not my peak time lol
  • Round 3 (45 min): 1 problem - Medium
    • Spent a lot of time talking about design, was eventually able to code the harder portion of the problem, but not all of the functions
    • Top google 50 questions
  • Round 4 (45 min): 1 problem - Hard
    • Never seen this problem before — struggled through it gracefully (I hope) and was not able to fully implement the code and also only implemented the brute force
    • I talked through the tradeoffs though and quickly implemented something coherent at the end, but was not able to finish the code
  • Round 5 (1 hr): Behavioral
    • Very straightforward, I just focused on emphasizing communication and collaboration and how I manage my time. I tried to use different examples for all of them and asked a lot of questions at the end.
    • Nailed this round b/c of how much time I spent prepping for Amazon LPs

Overall Thoughts

  • Very enjoyable. Every interviewer was super friendly towards me and really made some effort to make me feel relaxed. I also had more breaks in between interviews which was really nice to just stretch and just give my brain a quick mental break. The recruiters were super flexible and nice about me having to reschedule as well, which is something I really appreciated.
  • Edit: Tip: if you have a break, just step away from the computer and stretch. Just moving my body really helped my mind to refresh and recharge.

Retrospect
What I did well:

  • Communicating my thoughts clearly
  • Not jumping into code right away
  • Asked clarifying questions before starting to solve the problem
  • Felt pretty relaxed
  • Talked about different possible approaches
  • Talked about time complexity and tradeoffs

What I can improve on:

  • Get working code down first regardless of efficiency
  • Faster code writeup

Offer
Pending


Prep

Getting Interviews

  • Make good use of LinkedIn
    • make sure you have keywords in job description/skills that recruiters would look up
    • buy a month of LinkedIn premium, this is super useful and give you insights on how people are finding you and the insights of applicants at other companies
    • LinkedIn was how I found most of these opportunities. Additionally, I reached out to my school alumni that were in the companies I wanted and chatted with them and then they usually just offer to refer me after, which is really nice and probably helped a lot to get my foot in the door
    • Once I updated my LinkedIn, the flood gates of recruiters reaching out was crazy. I would get 1 recruiters reaching out to me daily for a two weeks
  • Resumes
    • not as important as you think. I spent way more time on my resume than necessary

Preparing

  • started in January and was just putting in about 2 hrs daily to learn
    • started going through the cracking the coding interview chapter by chapter (which wasn't that effective, I really should've done a BFS approach of the sections instead of DFS, i.e. go through one section per day and couple of questions instead of dedicating multiple days to one section until I was done)
  • after CTCI, I bought interview cake subscription and went through most the questions there. It taught me how I should go about approaching the questions
  • after interview cake, I was just grinding Leetcode for about 2 hrs daily (in March) and I also took the gr--king course on coding problem patterns (see resources)
  • in April, my learning approach really changed when I started learning about "Learning how to Learn" and this showed me how to learn more effectively so I started applying the methodologies to my leetcode to have deeper learning. Before, I was focusing on more just understanding the solution, but after this course, I would focus more on the how of solving problems.
    • This shift changed my learning dramatically. In addition, I started reading "When: The Scientific Secrets of Perfect Timing" by Dan Pink and this again, shifted my studying schedule. Basically, I learned that I was learning better in the morning than at night so I switched up my studying time to before work instead of after work. Mornings were definitely my peak time so I used that to my advantage. I would try to put 1-2 hrs in the morning and then an additional hour at night if needed. This helped me be more focused and absorbed material better. This is different for everyone so find your peak time and study then if you can.
  • kept a spreadsheet of problems that I solved and how long it took me to solve them (split among time to talk through approach, code and test) and if I needed to redo the problem.
    • the flow is like this:
      • I would do a problem and set the same interview constraints (25 min) and I would also talk out loud and practiced on google doc / white board / pen & paper. Sometimes if I was extra motivated, I'd also ask questions and then pretend to be the interviewer and give myself answers lol. Practicing this way definitely made it more natural for me to talk out loud during the actual interviews.
      • if I didn't get it, I would read solution after 30 min and also discussion to better understand the problem. Also, I'd search Youtube to see someone talk through the problem if available.
      • Then I'd switch tabs so I can't see the solution and then try to do a paragraph write up about the approach to the problem, focusing on how people arrived to the solution instead of the solution itself.
  • did mock interviews using i-n-t-e-r-v-i-e-w-i-n-g-i-o and pr-mp
    • my first i-n-t-e-r-v-i-e-w-i-n-g-i-o phone interview in March was horrendous and I was super discouraged lol, but then I took the feedback from the interviewer and really tried to improve myself
    • had about 3 pr-mp interviews, 2 out of 3 were pretty good. I kept in touch with my first interviewer and we set up weekly mock interviews with each other
    • feedback was extremely valuable, especially the negative ones because it really helped me improved in my process
    • had a mock interview with a google engineer who referred me, also extremely valuable
    • definitely made the real interviews had a better flow and helped me feel relaxed. I'd just think of the interview as a mock interview and just had fun instead of worrying about the outcome

TLDR:

  • practiced leetcode problems using BFS approach (would practice strings and arrays, then graphs, then DP). Each day, I'd put out a topic of problem I want to focus on and then practice problems in those area. Edit: Agressively leetcoded from March to June. Wish I had started coding sooner to be honest.
  • main focus was on arrays & strings, dp & recursion, graphs & trees
  • solved 150 problems by the time of my interviews (39 Easy, 96 Medium, 15 Hard)
  • did around ~7 mock interviews
  • daily routine:
    • drink water & meditate
    • solve Leetcode problems for 1-2 hrs
    • work
    • solve Leetcode problems / review system design for 1-2 hrs
    • work out for 30 min
    • on weekends, I'd dedicate a good 4 hrs in the morning to go through this.

Additional Tips/Thoughts

  • Meditation was the one thing that kept me feeling calm and not overwhelmed during this process, especially in the morning. I also would use meditation right before my interview to help calm my nerves.
    • Edit: I used the Meditation Studio app (https://meditationstudioapp.com/) to medidate for about 5-15 min each morning. Sometimes, I'd use it at night to help me sleep as well. There was no specific track I picked. Just whatever I felt like I was going to need that day. Sometimes it was stress related and others motivation related.
  • I also prioritized solving the problems first thing in the morning when my mind was most clear. I would not check emails or my phone until after I have finished solving the problems. This ensured that I did the problems and not have an excuse to not do them later in the day.
  • I sought therapy after my body just gave in to the stress and this helped my mind in more ways than I could ever imagine. I was very anxious and worried and just not in a good mental space when starting. Now, I'm getting better, it's still a process, but I definitely have better ways of dealing with it. I know therapy is expensive, but I was able to use one of those online therapy services and honestly it's just as good and more convenient and also cheaper. Highly recommend it. I know this is not a common tip in a lot of the experience posts lol, but I do think it helped me maintain a good perspective throughout this whole experience. Especially during this time when there's so much going on in the world.
  • Throughout this process, I became even more grateful for the people in my life who supported me and even strangers who've helped me as well (including this Leetcode community).
  • I've learned more about focusing on the process and enjoying the journey instead of the outcome. When I first started this process, I was focused on getting these job offers. But as I do more reflection and more leetcode, I started reframing the prep in my mind as like I'm learning and becoming better and that would motivate me to be consistent. Even as I was going through the interviews, I focused more on having fun and just sharing what I've learned and know. I reframed my nervousness as excitement and that really helped me stay calm and focused (although I could be more calm and focused always lol).
  • Stay positive! It's definitely a challenge and I've had multiple rejections and recruiters ghosting up to this point lol. Each one easier to deal with than the last. At the end of the day, you just gotta be happy with yourself and what you have in your life. Don't let the rejections get you down, nothing is a one and done. There will always be more opportunities in the future. You can let the failures get you down or you can let it propel you towards success.

Resources

Books:

Articles:

Other


Edits

Some thoughts that I forgot to add in the original post:

  • On dealing with not knowing enough: Towards the end (about two weeks before the interviews), I started "teaching" myself topics by just simply write out what I knew about arrays & strings, dp, trees, graphs using only my memory recall (i.e. no external references). I'd write up a whole article about each topic on how I would explain this to a freshmen computer science major. I ended up writing between 5-10 pages for each topic and then snippets of code or implementing the class (for example, I would write up code on how to do tree traversals and then code up general BFS and DFS code snippets, for DFS, I'd do preorder, inorder and postorder recursively and iteratively), which was VERY affirming that I knew my shit.

    • If you're feeling like you don't know everything, that's ok, you don't and I don't either. Our knowledge is not the same and that's the beautiful thing about it. Focus on what you do know will help you feel more relaxed.
    • If I couldn't recall something, I knew this was my gap in knowledge and I'd spend more time studying on this
    • Avoid solving new problems the day or two days before. This made me very anxious like there's so much more I needed to know (I did this in my first onsite interview w/ another company where I was rejected) and put doubts into my mind and I was very tense as a result
  • On motivating myself to study: a lot commented on my dedication so I'd figure I'd give you a tip on how I convinced my brain to do it. I used pomodoro technique to measure my progress. I would do 25 min intense focus studying, 5 min break. I'd tell myself I only need to do 4 pomo sessions of studying. This was better than thinking of it as 2 hrs of studying or feeling bad if I didn't meet my goal of 2 problems. I focused more on just putting in the time instead of the number of problems. Sometimes 4 pomos was for one problem, sometimes two problems. Just put in the time and you'll get to where you need to get to.

    • I used "Focus To-do" app to track this. It tells me how many pomos I've already spent on a certain task. Here's some more info: https://francescocirillo.com/pages/pomodoro-technique
    • I also never set a goal for number of Leetcode problems I needed to solve before onsite interviews and never focused on it. It just became the result of me focusing on putting 4 pomo sessions daily into studying.
  • On staying physically healthy: Being physically healthy helps with being mentally healthy. I maintained a pretty healthy diet throughout. Ate about 3 servings of veggies and 2 servings of fruits each day and worked out for about 30 ish min or go for 20-30 min walk daily. I made sure I always get at least 7+ hrs of sleep every night so that my brain has some time to recharge and put into memory what I learned from the day. SLEEP IS IMPORTANT FOR THE MIND. No, sleep deprivation is not cool to brag about anymore.

  • On rejections: I was rejected after one onsite interview with a mid-sized company and after one coding assessment with a startup that I spent 8 hours of my weekend on. Additionally, I've had Spotify just flat out reject my application (even with an employee referral lol). Countless recruiters ghosting and people ignoring me on LinkedIn. I've also sent in my applications to Adobe, Microsoft (with referral), Nike and a couple more startups and never heard back. The element of luck is definitely part of the process so don't take it personally.

  • Sorry if I'm not able to respond to every comment, but know I appreciate the positive vibes! I hope you all the best of luck on your journey :)


System Design Basics | Post 2 System Design Template

  1. ask for requirements - extremely important. DO NOT jump into designing without this first
    • functional/nonfunctional/scope
  2. capacity estimation (was asked to skip b/c not as relevant)
    • bandwidth/storage
  3. high level design
    • client/server/application/database
  4. component design - pick your best area and suggest to start there. Say something like "I could do deeper into client/server/database, but I think {INSERT YOUR BEST AREA} is a good place to start. Do you agree?" (got this from a Byte-by-Byte seminar)
  5. scale it up (I made an acrononym here to help me remember, it's a little silly but I'll share)
    • MSCANDaLS
      • Mapreduce,
      • Scaling,
      • Caching,
      • Asynchronous Processing,
      • Network metrics,
      • Database denormalization,
      • Loadbalancing,
      • Sharding


Tuesday, June 9, 2020

Puzzles

1.Vikram and Muthu befriended a girl. They ask her what is her birthday. She does not give a straight forward answer, but gives some hints.
 She gives them the following 10 dates to pick her birthday.
 May: 15, 16, 19
 June: 17, 18
 July: 14, 16
 August: 14, 15, 17
 Then she discloses correct month to Vikram and the correct date to Muthu.
 Asks Vikram to guess the right birthday. He says sorry I can't, but I am sure even Muthu won't be able to guess it right.
 Now Muthu says, I was a bit confused but with Vikram's statement, I know what is her birthday.
 Now Vikram says if that is the case, I also know what is it.
 Both guessed it right. Use simple logic to guess the right birthday. Go ahead

2. 




















3. Four people gathered and they had some mangoes with them. They wanted to eat them next day. First person felt hungry and wanted to have his quota. So he divided into four parts but one was left. He threw it off to a monkey and ate his portion. After awhile second guy got up. He also decided to eat his part. So he divided into four parts and one was left. He threw to that monkey and ate his part. Same happened with third and fourth guys. Next day morning they got up, divided the remaining among themselves and ate. This time there was nothing for monkey. How many mangoes were there originally?

4. A person in room number (13) (see the pic) had recovered from Corona, he loved to say goodibye to all patients, but the doctors told him if you say goodibye to the same patient twice you will be infected by corona again!  How you could draw his path to go out of the building without infection?! (You can provide the path as R1, R2 , .. in case if you are unable to draw & respond).

























Answers are given at the end of the page.






Answers :

1. The answer for the puzzle is : July 16th.
2. The answer for this puzzle is 12.
3. The answer for Weekend Puzzle - 3 is 765
4.  Basically he has to visit his own room once more. (13->9->13->14 or 13->14->13->9 ) will be the beginning and the rest of the path could vary.

Scope in pom.xml

The <scope> element can take 6 values: compileprovidedruntimetestsystem and import.

This scope is used to limit the transitivity of a dependency, and also to affect the classpath used for various build tasks.

compile

This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects.

provided

This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.

runtime

This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.

test

This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases.

system

This scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.

import (only available in Maven 2.0.9 or later)

This scope is only used on a dependency of type pom in the section. It indicates that the specified POM should be replaced with the dependencies in that POM's section. Since they are replaced, dependencies with a scope of import do not actually participate in limiting the transitivity of a dependency.


 

Monday, June 8, 2020

Top 50 Google tagged questions. (With Links)

  1. Two Sum (https://leetcode.com/problems/two-sum)
  2. Insert Interval (https://leetcode.com/problems/insert-interval)
  3. Text Justification (https://leetcode.com/problems/text-justification)
  4. Minimum Window Substring (https://leetcode.com/problems/minimum-window-substring)
  5. Maximal Rectangle (https://leetcode.com/problems/maximal-rectangle)
  6. The Skyline Problem (https://leetcode.com/problems/the-skyline-problem)
  7. Maximal Square (https://leetcode.com/problems/maximal-square)
  8. Meeting Rooms II (https://leetcode.com/problems/meeting-rooms-ii)
  9. Find Median from Data Stream (https://leetcode.com/problems/find-median-from-data-stream)
  10. Bulls and Cows (https://leetcode.com/problems/bulls-and-cows)
  11. Count of Smaller Numbers After Self (https://leetcode.com/problems/count-of-smaller-numbers-after-self)
  12. Longest Increasing Path in a Matrix (https://leetcode.com/problems/longest-increasing-path-in-a-matrix)
  13. Longest Substring with At Most K Distinct Characters
    (https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters)
  14. Moving Average from Data Stream (https://leetcode.com/problems/moving-average-from-data-stream)
  15. Logger Rate Limiter (https://leetcode.com/problems/logger-rate-limiter)
  16. Design Hit Counter (https://leetcode.com/problems/design-hit-counter)
  17. Max Sum of Rectangle No Larger Than K (https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k)
  18. Decode String (https://leetcode.com/problems/decode-string)
  19. Evaluate Division (https://leetcode.com/problems/evaluate-division)
  20. Split Array Largest Sum (https://leetcode.com/problems/split-array-largest-sum)
  21. Robot Room Cleaner (https://leetcode.com/problems/robot-room-cleaner)
  22. Random Pick with Weight (https://leetcode.com/problems/random-pick-with-weight)
  23. Subarray Sum Equals K (https://leetcode.com/problems/subarray-sum-equals-k)
  24. Longest Line of Consecutive One in Matrix (https://leetcode.com/problems/longest-lineof-consecutive-one-in-matrix)
  25. Design Search Autocomplete System (https://leetcode.com/problems/design-search-autocomplete-system)
  26. Split Array into Consecutive Subsequences (https://leetcode.com/problems/split-array-into-consecutive-subsequences)
  27. 24 Game (https://leetcode.com/problems/24-game)
  28. Minimum Window Subsequence (https://leetcode.com/problems/minimum-window-subsequence)
  29. Network Delay Time (https://leetcode.com/problems/network-delay-time)
  30. Open the Lock (https://leetcode.com/problems/open-the-lock)
  31. Expressive Words (https://leetcode.com/problems/expressive-words)
  32. Find And Replace in String (https://leetcode.com/problems/find-and-replace-in-string)
  33. Guess the Word (https://leetcode.com/problems/guess-the-word)
  34. Hand of Straights (https://leetcode.com/problems/hand-of-straights)
  35. Shortest Subarray with Sum at Least K (https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k)
  36. X of a Kind in a Deck of Cards (https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards)
  37. Minimum Area Rectangle (https://leetcode.com/problems/minimum-area-rectangle)
  38. Validate Stack Sequences (https://leetcode.com/problems/validate-stack-sequences)
  39. Flip Equivalent Binary Trees (https://leetcode.com/problems/flip-equivalent-binarytrees)
  40. Minimum Domino Rotations For Equal Row (https://leetcode.com/problems/minimum-domino-rotations-for-equal-row)
  41. Longest String Chain (https://leetcode.com/problems/longest-string-chain)
  42. Shortest Way to Form String (https://leetcode.com/problems/shortest-way-to-formstring)
  43. Confusing Number II (https://leetcode.com/problems/confusing-number-ii)
  44. Delete Nodes And Return Forest (https://leetcode.com/problems/delete-nodes-andreturn-forest)
  45. Snapshot Array (https://leetcode.com/problems/snapshot-array)
  46. String Transforms Into Another String (https://leetcode.com/problems/string-transformsinto-another-string)
  47. Divide Chocolate (https://leetcode.com/problems/divide-chocolate)
  48. Divide Array in Sets of K Consecutive Numbers (https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers)
  49. Minimum Distance to Type a Word Using Two Fingers
    (https://leetcode.com/problems/minimum-distance-to-type-a-word-using-two-fingers)
  50. Time Needed to Inform All Employees (https://leetcode.com/problems/time-needed-toinform-all-employees)

Saturday, June 6, 2020

FAANG : The Journey | Post 2 - Interview Experience

Note: This is not my personal experience, i just shared it out, because i liked it.. Enjoy   :) This is sort of the guide to prepare for the interview.


Recruiter reached out to me on LinkedIn. Spoke to the recruiter over the phone and scheduled a phone interview after 2 weeks.

Phone

LP(20 mins)
Technical (20 mins) - One of the most "freKuently" asked questions. Can be easily found in the top Amazon questions - Implementation was very easy, but took about 20 minutes to finish this as the interviewer and I were just discussing the different approaches and I asked a lot of clarifying questions before I started the implementation.
Technical (15 minutes) - A math-based question. Unfortunately, I can't give more information about this question as it is a very direct math question. It is a medium question in leetcode. But the expectation was to come up with the brute force approach and we just discussed the optimal approach.
Reverse Interview (5 minutes)
I Got an email in an hour from the recruiter, inviting me for a virtual onsite interview. The interview was scheduled after a month. Had a total of 5 rounds.

#1 - This was my worst round. There was the main interviewer and a shadow interviewer. Both of these interviewers were experienced interviewers. Only after all my interviews, I realized that this was the bar raiser.

LP(30 minutes)
Technical (25 mins) - A very simple "puzzle" question(not there in leetcode). Easily solvable using binary search. But I was so tensed throughout the interview that I could not solve this simple binary search problem without taking a zillion hints.
Reverse Interview (5 minutes) - At this point, after giving me all the hints in the world, the interviewer knew that I was not the right fit for the role. Most of his answers were one word.
#2 - System design round. This went fair. There was a main interviewer and a shadow interviewer again. Could discuss only the high-level design of the system due to time constraints. The interviewer had a lot of questions like NoSql vs Sql, load balancing, authentication and authorization, etc

LP(30 minutes)
System design (25 mins) - The system asked to design was something similar to what the team does.
Reverse Interview (5 minutes)
break

#3 - This went very well. There was just one interviewer.

LP(30 minutes)
Technical (25 mins) - One of the most commonly asked Hard Tree questions. (hint: the same question can be asked for a binary tree as well as a BST - and it is not LCA)
Reverse Interview (5 minutes)
#4 - This went very well. There was just one interviewer. Had a lot of time in the end as I finished this problem with a lot of time in hand.

LP(20 minutes)
Technical (25 mins) - This was one of those "Design a data structure which can..." type of questions
Reverse Interview (5 minutes)
#5 - Hiring Manager. Here again, there was the main interviewer and a shadow interviewer.

LP(60 minutes)
Interview tips:

LP prep

DO NOT IGNORE LEADERSHIP PRINCIPLES. If you see my experience above, I had ~3 hours of just LP questions. Based on my experience, for Amazon, LP >>>> technical skills(70-30). For anyone struggling with LP, this is what I did,

I started preparing for LP on the day I got the LinkedIn message from my recruiter. This is very important. This is not something you can do the previous night. Make sure you distribute your time equally for LP and tech.
To start with, I did not look at the leadership principles. I made a list of my past experiences(about 30-35 points). Just noted down the keywords. It was very hard for me to come up with 30-35 points. I did not worry about how big or small these experiences were. Just listed them first. For example:
Changed our DB from X to Y
Created tech documents for my team.
Came up with an idea...
After the above step, I went through the amazon leadership principles. I did not understand a lot of these principles and I had to read this interviewgenie blog to understand the principles thoroughly. It not only explains the LPs, but also gives examples of the LP questions asked in an Amazon interview.
At this point, I filtered out 20 of my past experiences that I thought were my best experiences and came up with a story for each of these experiences. No logic behind the number- "20", just a random number. But make sure that you have at least 14 experiences. Once I had a base story for these experiences, I tagged them with more than one LP. Finally, I started answering the sample questions in the interviewGenie blog based on these base stories(tip: write/type these stories in your favorite note app. You will not remember the same points every time you think about the same question. Having it written down will help you not forget any important points that you wanted to mention). Also make sure that each experience can be used for different questions, but worded in a different way for each question. This will allow you to have more than one experience for a question and you can just talk about the experience that comes to your mind during the interview. Reusing the same experience is a NO, try to avoid that.
Also, I made sure that the experiences that I had were experiences that helps my interviewers understand how I could be a good fit for the role. This is also very important. You might have had a lot of good experiences in the past, but if they mean nothing to the work you will be doing in whichever team you are interviewing for, you are just wasting time. So make sure that your past experience is said in a way that the interviewer feels that this experience of yours will benefit the team.
I spent about 1-2 hours every day just preparing for LP.

Tech prep

There's not a lot that I did differently. Started with Cracking the coding interview, understood all the basic algorithms that everyone should know before a FAANG interview, made sure I was thorough with all the datastructure and the syntaxes. I would strongly recommend starting your prep by watching this - https://www.youtube.com/channel/UCZCFT11CWBi3MHNlGf019nw - for algorithms. Those videos are very helpful.
Solved about 20-30 easy questions for all the tags on leetcode(Trees, HashMap, Strings, DP, DFS, BFS, etc)
Sorted all the Amazon questions asked in the last 2 years based on their frequency and started with all the easy problems, then medium and finally hard problems. One point to note here is that I solved about 450 questions on leetcode and I hardly came up with the right solutions(brute force or optimal) for about 150-175 problems. The remaining ~300 questions were solved by looking at the solutions of other people. This helped me a lot. If you are doing this, make sure to understand the solution and type it on your own. There were times when I just copied the solutions to a few complex problems and submitted them assuming that I have understood those. I wouldn't have got the job if I was asked those questions, because there will be a lot of follow up questions. You need to have a reason behind every line of code that you type in your interview. So make sure that you call your preparation complete when you can say that "I have understood the thought process for coming up with a solution of x problems" rather than "I have solved x problems"(this only means that you achieved the task of submitting answers online.
*** the System design [gnikkorG the system design interview]was the go-to guide for system design. This is totally worth it. But there a tons of youtube videos that can also help you. One tip for this round, do not talk about something that you have just heard about and you have no idea about this tech in detail.
FAQ asked in other posts
YOE - 3
Total time for preparation - About 3 months. I had started preparing 2 months before I applied to Amazon.
Salary - Still negotiating
After my phone interview - HR got back to me in an hour
After the virtual onsite interview - HR got back to me on the third business day
IDE - just like a regular editor, but a little fancy
Syntax help - Did not need any help with syntax, so not sure if interviewers are okay with us googling the syntaxes


Overall I am very thankful to leetcode and it's members as I have got to learn a lot from this platform in the last 3 months. So thank you to each one of you and good luck with your interview preparation.


Ref : https://leetcode.com/discuss/interview-experience/670320/nda-amazon-aws-sde2-seattle-may-2020-offer