Taking On Google's HARDEST Interview Questions

15,373
0
Published 2022-08-25
A top competitive programmer from the Codeforces/CodeChef realm (with almost zero prior interview experience) takes on some of the hardest interview questions known to Google to find out... how good is competitive programming, really? Is it enough to dominate even the hardest questions that Google has to offer? Or will these questions be enough to stump me? Find out in this video experiment.

(yes, lowest solve rate doesn't necessarily mean hardest, but it's the best I could do, and they were pretty hard anyway)

Thumbnail background: www.vecteezy.com/vector-art/7243548-boxing-ring-ba…

Mega Google list (& others): github.com/krishnadey30/LeetCode-Questions-Company…
My script: pastebin.com/L0DMHH8h
Questions sorted by difficulty (note that it’s a bit outdated, so the numbers will be off, but the relative order still seems right): pastebin.com/H3Jj6Zaa

Questions
Q1 (18.5%): leetcode.com/problems/valid-number
Q2 (21.3%): leetcode.com/problems/max-points-on-a-line
Q3 (21.8%): leetcode.com/problems/find-the-closest-palindrome
Q4 (27.6%): leetcode.com/problems/word-ladder-ii
Q5 (16.6%): leetcode.com/problems/string-to-integer-atoi/

Music

Paradise by Ikson ( youtube.com/ikson )
Link:    • Ikson - Paradise  

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

Sthlm Sunset by Ehrling
   • Ehrling - Sthlm Sunset  
(not exactly sure how to credit, the given link is dead)

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

Timestamps [note that 1st hardest is skipped because I already did it]:
0:00:00 Intro
0:00:37 Format
0:02:02 Q1 (2nd hardest, 18.5%)
0:13:14 Q1 - Recap
0:14:11 Q2 (3rd hardest, 21.3%)
0:50:08 Q2 - Recap
0:51:30 Q3 (4th hardest, 21.8%)
1:02:44 Q3 - Recap
1:03:24 Q4 (5th hardest, 27.6%)
1:15:59 Q4 - Recap
1:16:33 Q5 (hardest medium, 16.6%)
1:23:23 Q5 - Recap
1:24:08 Conclusion

All Comments (21)
  • @ShajidHasan
    That jumping steam icon was hurting my eyes so much. I actually had to cover it up with something.
  • @wesleyso0
    Not surprised I keep learning something new every time you post a video, Colin. Thank you for spending your time to making these fun and educating videos!
  • @ledira8539
    This is incredible to watch, I honestly thought I learnt c++ but clearly I know nothing. I really appreciate this kind of content exists, it's a huge helper for understanding the workflow when solving problems with code.
  • @ron0studios
    Woah youve bounced back from the motivation crash more efficient than ever! Weekly uploads! This is awesome
  • @offchan
    You can solve the first question just by using regular expressions or even simpler: just convert the string to float and see whether it succeeds.
  • thank you bro the most essential thing we are learning here is how to approach a problem. it takes a hell lot of time to develop it. can you do one thing teach us algorithms like dfs and bfs and how to use them in different scenarios? the dfs and similar question the hard problems.
  • @Andrew_J123
    For Q2, if you're ok with working with doubles can't you just hash a tuple of the unit vectors of each point and count how many times that unit vector appears. You would need to do some edge cases I believe but I think it might go smoothly
  • @tagberli
    Google just take this guy or he will destroy every hardest problem possible
  • @madarsmit
    Regarding the map question: it doesn't meet the "Compare" requirement (see cppreference). With a=(-1,-1), b=(-1, 1), c=(1,1) we have a
  • @Eidan78
    You are just amazing. If someone wants to become like you where would you suggest to start and what roadmap do you suggest? Please anything that come to your mind. Website...books... anything! Keep going!
  • @EAzZY-
    What you do on steam ? (Just curious)
  • @yusufakn7173
    The reason might just be how leetcode manages the time limit for different languages, but following O(n^3) python code is judged AC for Q2 : class Solution(object): def maxPoints(self, points): """ :type points: List[List[int]] :rtype: int """ L = len(points) ans = 1 for i in range(L): for j in range(i+1, L): a,b = points[i], points[j] tmp = sum(map(lambda x: (a[1] - b[1])* (b[0]- x[0])== (b[1] - x[1]) *(a[0] -b[0]), points)) ans = max(ans,tmp) return ans
  • 2:53 while reading my compiler books I have already been familiar with this lels, If I got it, I'd just slap the state machine. I think it's important to know such tools when you need to create some critical application and you just dont' have all the "testcase judge" with you
  • @onurislak
    are you working faang companies?how did you learn coding like this?
  • @tagberli
    What is your favorite class in terraria btw?