Dissecting FAANG Interview Questions

18,439
0
Published 2022-07-26
In this video, I explain, in detail, my thought process and solutions to 4 (hard) FAANG interview questions from a previous video of mine. Feel free to try them yourself!

Original video:    • Top Competitive Programmer vs. FAANG ...  

Questions
Facebook: leetcode.com/problems/making-a-large-island/
Apple: leetcode.com/problems/merge-k-sorted-lists/
Amazon: leetcode.com/problems/consecutive-numbers-sum/
Google: leetcode.com/problems/odd-even-jump/

My code
Facebook: leetcode.com/submissions/detail/747305005/
Apple: leetcode.com/submissions/detail/747310669/
Amazon: leetcode.com/submissions/detail/747315715/
Google: leetcode.com/submissions/detail/747322536/

Support me with money: www.buymeacoffee.com/galencolin

Music:

Local Forecast - Slower by Kevin MacLeod
Link: incompetech.filmmusic.io/song/3988-local-forecast-…
License: [yt dislikes this link, removed]

This Is For You (Prod. by Lukrembo)
Link :    • lukrembo - this is for you (royalty f...  

Timestamps:
00:00 Intro
00:49 Facebook/Meta - Question
02:18 Facebook/Meta - Solution
10:17 Facebook/Meta - Code
11:24 Apple - Question
11:57 Apple - Solution
17:12 Apple - Code
18:17 Amazon - Question
18:50 Amazon - Solution
28:29 Amazon - Code
29:20 Google - Question
31:02 Google - Solution
42:58 Google - Code
44:08 Conclusion

All Comments (21)
  • @kimhyr
    After watching multiple videos by you, I keep asking myself this question: "is this guy a well-established competitive programmer?" I tend to always ask myself this during the introduction of your videos.
  • thank you for these videos! as an entry level coder, who only knows his way around java, these videos are great to expand the knowledge !
  • @shoooozzzz
    Awesome walkthrough on your solutions. Confirming the first question is still being asked. Just got it yesterday.
  • @nivalderramas
    Congrats for growing up the channel, you're such a good motivation
  • Thanks a lot Colin, Kindly keep making these type of videos, your explanation is quite good.
  • @gurparv1993
    Thank you for always sharing the good stuff.. 🙏🙏
  • @Abhinavneelam
    Holy that lower bound set is huge. I can solve many problems with this idea. Thanks 😊
  • @aries3690
    I really loved your step by step solution to the Amazon question! Thanks for sharing
  • @luanlucas8605
    Awesome content! Found your channel not long ago and had to subscribe. Please keep up the great work!
  • @alok1819
    g0d level explaination , thank u for such great content ❤️❤️
  • This is very easy understand . Please continue making more explanation videos
  • @tempOrary_13
    Yay!!! I subscribed just so you would make this video. Thanks!!!
  • @jez2718
    An idea for how one could optimise problem 1 further: You don't need to consider all of the 0s in the grid as potential 0s to flip. The only zeros that matter are the ones which are adjacent to a 1 (i.e., that lie in the exterior boundary of your connected components of 1s). And you can find all of these as you are doing your search that finds the components: every time one of the neighbours you encounter is a 0, you record the coords of that 0 and that the 0 was adjacent to the current component. So at the end of your search you have the size of each component, and for each boundary 0 you have a list of components which that 0 is adjacent to. Then for each such 0 you compute 1 + sum of sizes of adjacent components, and output the max. If the number of boundary 0s is O(n^2) this will be slower (though still O(n^2)), but if it is say O(n) this approach should be much faster. Consider a grid which is almost all 0s, you really don't want to try flipping all of them.
  • @jupiter2809
    The one and only cp best channel.....Keep growing up bro.....Soon this channel will be one of the best cp channel in the world.....This channel also now on fire🔥
  • @N3fario
    not necessarily related, but what do you do to grow out and maintain your hair
  • @sh_412
    The merge sorted arrays actually now asks for a O(log(m+n)) solution ,using binary search its kinda hard
  • Hi, do u think the reason for early success in cp is due to having good math background? It's popular opinion that those who achieve success in contest usually already have good math skills?