Acing Google Coding Interview as an 18 year old High School Student

  Рет қаралды 2,822,043

William Lin

William Lin

4 жыл бұрын

For my 50k subscriber special, I did a mock Google coding interview with Clement, an ex-Google engineer. As a competitive programmer, I have a lot of experience with algorithmic problems. Check out my channel to learn more about competitive programming!
Check out the other Google coding interview on Clement's channel: • Google Coding Intervie...
Second channel (William Lin ++): / @williamlinpp4187
Website: williamlin.io/
Instagram: / tmwilliamlin168
Twitter: / tmwilliamlin168
Discord: williamlin.io/discord

Пікірлер: 1 900
@clem
@clem 4 жыл бұрын
That ex-Google coding interviewer looked impressed! 😎
@pranjalsoni549
@pranjalsoni549 4 жыл бұрын
The frontend of algo expert is one of the best I have seen .
@riteshrastogi5388
@riteshrastogi5388 4 жыл бұрын
I am not saying that the third problem is easy ; It is tough ; I did remember when I did something like that for the first time ; yes ; indeed ; it was tough. But the fact is ; the third problem is trivial. It is famous by the name of "Re-rooting technique" in competitive programming ; and this is what tmw used ( Plus the problem is actually simple as compared to other rerooting problems out there )
@Clrkz
@Clrkz 4 жыл бұрын
@@Tacoslover770 lol 0:49
@kartaLaLa
@kartaLaLa 4 жыл бұрын
Want to see tmw interview you next time 😆 It will be quite fun and challenging
@rahulsbhatt
@rahulsbhatt 4 жыл бұрын
Yeah, I wonder who is he?😜
@kevindebruyne9218
@kevindebruyne9218 4 жыл бұрын
He coded the KZfaq algorithm to where more of his videos would pop up in your recommended.
@alibee2083
@alibee2083 4 жыл бұрын
William or Clement?
@SolomonBaka
@SolomonBaka 4 жыл бұрын
@@alibee2083, Clement, then William hacked it and corrected the error :)
@Mayank-hm7cc
@Mayank-hm7cc 3 жыл бұрын
@@SolomonBaka really 🤔🤔
@faustollapa
@faustollapa 3 жыл бұрын
Best midfielder in the world
@atharvabarsode8626
@atharvabarsode8626 3 жыл бұрын
If only it were that simple -.-
@arjay_2002
@arjay_2002 4 жыл бұрын
interviewer: does that make sense? him: yeeehaa me: wtf jus happened
@vuger01
@vuger01 4 жыл бұрын
Same :D
@alphonsusho8962
@alphonsusho8962 4 жыл бұрын
Bruh I never even code and I watched this video, and was so confused all the way
@alanwake4537
@alanwake4537 4 жыл бұрын
@@alphonsusho8962 me too.. idk why this is my recomended
@artarkgaming5997
@artarkgaming5997 4 жыл бұрын
Alphonsus Ho Even If you were an experience programmer. He’s going extremely fast
@aiist6743
@aiist6743 4 жыл бұрын
@@artarkgaming5997 mashallah tbark allah alhamdulillah inshallah better astagfirullah
@limbolegs
@limbolegs 3 жыл бұрын
(Me who knows nothing about coding): hmm yes yes that looks good
@dgaf2219
@dgaf2219 3 жыл бұрын
Same lmfao
@nuclearboy5714
@nuclearboy5714 3 жыл бұрын
All i know is simple css code 😂
@pranitp.1622
@pranitp.1622 3 жыл бұрын
@@nuclearboy5714 lmao same I feel soo useless now
@harsh4567
@harsh4567 3 жыл бұрын
Not relatable Flex
@drunkenone1699
@drunkenone1699 3 жыл бұрын
I only know the most basic stuff from C and Cplusplus
@briandesign
@briandesign 4 жыл бұрын
I have no idea what is going on, but I still watched the whole thing
@sidharth8823
@sidharth8823 4 жыл бұрын
Same 😂
@alexissorianooo
@alexissorianooo 4 жыл бұрын
same bro
@OFaruk58
@OFaruk58 4 жыл бұрын
This is too smart and handy for his age. Or I am too dumb for my age. Because I am also 18 but can not solve those things.
@edwardwang9209
@edwardwang9209 4 жыл бұрын
@@OFaruk58 I had 0 programming knowledge at 18 lol
@sourabhkhandelwal1568
@sourabhkhandelwal1568 4 жыл бұрын
Honestly although coming up with the solution is hard but understanding what he saying is pretty easy. So, I think this comment is sarcastic.
@aqib829
@aqib829 4 жыл бұрын
Ok. William is being humble here. Pretty sure if this wasn't an interview he would have completed all the problems in 10 mins.
@Qizot
@Qizot 4 жыл бұрын
give him some vim and in 5 minutes he would be done
@El1as--
@El1as-- 4 жыл бұрын
Lol
@ivanp4740
@ivanp4740 4 жыл бұрын
It's okay. Actually, most of the engineers, who work in G/F can complete this in short period of time(this is as easy/medium questions from leetcode) but coding interview it's not just about problem solving. So... Sure, for competitive programmers of this level, this questions is very easy, because they are easy even for not competitive programmers :D
@durantburner7428
@durantburner7428 4 жыл бұрын
Yeah but in a company in the caliber of Google it isn't just about solving the problem, it is working with your team, explaining, and collaborating.
@atk_2815
@atk_2815 3 жыл бұрын
It’s an interview, it is just as important to explain your thought processes as it is to get it correct
@Datnigganeo
@Datnigganeo 3 жыл бұрын
I have no clue why I’m watching this and why I can’t stop as if I’m absorbing information, even though I’m fucking clueless as to what’s happening
@asian_buddie1405
@asian_buddie1405 3 жыл бұрын
That’s exactly what I was gonna comment 😂 literally watching the whole thing bc it’s just interesting how smart people talk to eachother
@Bigbossfredo_
@Bigbossfredo_ 3 жыл бұрын
Word^
@gamerplay8922
@gamerplay8922 3 жыл бұрын
I had no idea how to do this but listening to him explain it I was like o I see what you did like I was following along and understood. Nuts! Good communication on the code.
@hasannahle4687
@hasannahle4687 3 жыл бұрын
@lil clit7 absolutely yes, he is one of the finest youtubers in the world if its not him then who
@Joemels
@Joemels 3 жыл бұрын
I only understood the first part of the first problem
@matildapawlega8527
@matildapawlega8527 3 жыл бұрын
Bruh I feel like a useless human watching this
@saint8350
@saint8350 3 жыл бұрын
This isn't the point of life
@badass6300
@badass6300 3 жыл бұрын
cuz you rely on school, universities and don't self-educate.
@farzankh
@farzankh 3 жыл бұрын
Hahahaha
@losasakarosa9050
@losasakarosa9050 3 жыл бұрын
You’re not!
@saint8350
@saint8350 3 жыл бұрын
God created you for a reason
@christianviray3176
@christianviray3176 3 жыл бұрын
*"The left property, the right property"* Me: Ahhh, yes its Real Estate
@nrr12k47
@nrr12k47 2 жыл бұрын
brooo that got me LMAOOO
@speisequark2
@speisequark2 2 жыл бұрын
it's free real estate
@weeeeeeeeeeeeeeee360
@weeeeeeeeeeeeeeee360 3 жыл бұрын
"Am I allowed to Google the solutions?"
@codycis
@codycis 3 жыл бұрын
This should have more likes
@birchtree5884
@birchtree5884 3 жыл бұрын
Programming in a nutshell
@necaton
@necaton 3 жыл бұрын
Google Interview in an nutshell
@Ultimaus
@Ultimaus 3 жыл бұрын
This coding interview is so much more practical than regular interviews. Like where do you see yourself in 5 years
@fruitygranulizer540
@fruitygranulizer540 2 жыл бұрын
there are multiple interview stages, im sure they ask those kind of behavioural and other kind of questions in later interviews. they first filter out ppl through technical interviews
@angelachanelhuang1651
@angelachanelhuang1651 11 ай бұрын
law school is great for undergrad
@aaronhall1068
@aaronhall1068 9 ай бұрын
usually, at least for all the internships Ive applied to, its the opposite. Behavioral phone interview, behavioral interview in person / on zoom, then technical @@fruitygranulizer540
@LettuceLand
@LettuceLand 9 ай бұрын
Obviously this is a technical interview
@Mockedarchie
@Mockedarchie 4 жыл бұрын
"Alright that was like a introduction question" ...... Me: "oh"
@gaoalexander73
@gaoalexander73 3 жыл бұрын
And hes a high school student, dang. I can't imagine understanding this stuff in high school.
@andyacevedo8270
@andyacevedo8270 3 жыл бұрын
Same here lol
@wolfgod1664
@wolfgod1664 3 жыл бұрын
You won’t I’m in high school and I didn’t even understand this lol
@ohreally4752
@ohreally4752 3 жыл бұрын
i’m in high school and i take some java programming classes and they still are confusing
@joejoe5081
@joejoe5081 3 жыл бұрын
@@ohreally4752 I think he uses c++ or c as his go to. Not sure though cause I found him recently
@k23180
@k23180 3 жыл бұрын
@@wolfgod1664 fr lmao
@DanT-iu6oc
@DanT-iu6oc 4 жыл бұрын
> Solves leetcode medium > holy shit I'm so smart > goes on this channel > gives up, cries
@BaoGia-mi3pk
@BaoGia-mi3pk 4 жыл бұрын
life is not fair guy, get used to it
@ThatGuy56326
@ThatGuy56326 4 жыл бұрын
God damn 18 year old gets this problem instantly im sitting here like 👁👄👁
@hnwlightsugar2280
@hnwlightsugar2280 4 жыл бұрын
cant solves even the homework, goes on leetcode easy, can't solve it , give up, cries.
@bombbchu
@bombbchu 4 жыл бұрын
how long do you guys think he has been coding? Life is indeed not fair but you must understand that coding is a skill that takes years and years of practice to get to this level.
@ThatGuy56326
@ThatGuy56326 4 жыл бұрын
a_bombchu pretty sure his mom had a god damn computer in her womb
@ahsanali50
@ahsanali50 3 жыл бұрын
I have heard about only one tree in my life ; that is Christmas Tree 🎄
@shllyk
@shllyk 3 жыл бұрын
and family tree which i made in 2nd or 3rd grade
@earfquake3518
@earfquake3518 3 жыл бұрын
“They’re speaking the language of the gods.”
@sakibmullick
@sakibmullick 3 жыл бұрын
vegita found
@808.sfx_
@808.sfx_ 3 жыл бұрын
Literally what i was thinking💀
@dgaf2219
@dgaf2219 3 жыл бұрын
🤣🤣🤣🤣nah fam they alien 👽
@kelechidan2560
@kelechidan2560 3 жыл бұрын
@@sakibmullick 🤣
@bradvan8156
@bradvan8156 3 жыл бұрын
*interview starts for Google * Interviewer: alright let’s get started Me an intellectual: can I use Microsoft Word instead of Google Docs? Interviewer: Get out
@anonded
@anonded 3 жыл бұрын
Caleb city
@XaneePark
@XaneePark 3 жыл бұрын
Lmao 🤣🤣
@demmor4569
@demmor4569 2 жыл бұрын
Wkwkkwk
@demmor4569
@demmor4569 2 жыл бұрын
Hahahahaha
@bradvan8156
@bradvan8156 3 жыл бұрын
Me: *furiously typing* Interviewer: what’s going on? I’m not seeing anything on the Google Doc? Me: *on stackoverflow*
@Anonymous-mz9un
@Anonymous-mz9un 3 жыл бұрын
lol.
@DjQwEEkPTinBF
@DjQwEEkPTinBF 3 жыл бұрын
You are hired
@azzazz430
@azzazz430 3 жыл бұрын
@@DjQwEEkPTinBF Sir, we have found a new CEO
@e2k220
@e2k220 3 жыл бұрын
time stamp
@MultiGamingOfficial
@MultiGamingOfficial 3 жыл бұрын
@@e2k220 are you that dumb?
@hesselbleeker6353
@hesselbleeker6353 4 жыл бұрын
i don't even know what he's doing but i like it
@user-sj2vp9mk5t
@user-sj2vp9mk5t 3 жыл бұрын
i don't even know what he's saying but i like it
@tejas1027
@tejas1027 3 жыл бұрын
@@user-sj2vp9mk5t i don’t even know what am I watching but i like it
@budjawa457
@budjawa457 3 жыл бұрын
@@tejas1027 I don't even know
@Slackful
@Slackful 3 жыл бұрын
@@budjawa457 I dont
@hermesingenui2653
@hermesingenui2653 3 жыл бұрын
I
@MriLevi2
@MriLevi2 3 жыл бұрын
So much fun to see. Still in my first year of studying programming, but it's so fascinating to see him think. Very organized way of thinking and obviously very smart too. Hoping I'll be as fluent with it as him in a few years!
@jaeseonghan1691
@jaeseonghan1691 2 жыл бұрын
hows your journey of programing going so far
@justyashin476
@justyashin476 Жыл бұрын
How’s it been
@OneLordeAnimeClips
@OneLordeAnimeClips 7 ай бұрын
@@justyashin476 He's too busy architecting a solution to the knapsack problem to respond to us plebs
@---------------------------__
@---------------------------__ 4 жыл бұрын
11:56 William: "Does it make sense so far" Clement: "Yes" Me: No. I haven't understood anything.
@inordirection_
@inordirection_ 3 жыл бұрын
It's okay, Clement said yes to keep the interview moving along but he was lost more often than he let on.
@CarlosPerez-te4gx
@CarlosPerez-te4gx 3 жыл бұрын
Hey guys this is so legit I tested w Google interview and failed but the way this video is presented feels exactly how I felt during my interview. Good luck to you if you are planning to interview =)
@DeadManRunning1
@DeadManRunning1 3 жыл бұрын
interviewer: "so now let's move on to something completely different" ... "so let's go back to that binary tree..."
@koshey245
@koshey245 3 жыл бұрын
Well to be fair it's almost shifting the entire try, so the tree isn't really static anymore persay
@shadon_official2510
@shadon_official2510 3 жыл бұрын
Lmaooo
@hontonix1413
@hontonix1413 4 жыл бұрын
Interviewer: *speaks coding language* Him: *explains coding* Me: yes that makes sense now
@nguyenhoanglong420
@nguyenhoanglong420 3 жыл бұрын
Me: I understand it a part of it !
@abdi6189
@abdi6189 3 жыл бұрын
Bruh im done, im currently in my second semester for cybersecurity and after seeing this im out
@SuperQuarterNote
@SuperQuarterNote 3 жыл бұрын
You can do it!
@houssam6249
@houssam6249 3 жыл бұрын
Don't give up bro
@kokonut5498
@kokonut5498 3 жыл бұрын
Bro giving up is the end of all ends. Just keep pushing even if u feel like ur not progressing
@varunk6633
@varunk6633 3 жыл бұрын
Just try to understand things topic by topic. You will be more brilliant than you know.
@nxh777
@nxh777 3 жыл бұрын
bruh don’t do it keep goin
@miguelrevera6856
@miguelrevera6856 4 жыл бұрын
A more eloquent solution for Prompt#2 For each node, add the sum of (original full tree) depth and re-iterate down to zero adding those sums also. e.g. Node#8: its original depth is 3, therefore we know it can be used in up to 3 (sub) trees, each time decreasing in depth. So the total from this node is 3+2+1+0 = 6. The same for Node#9. Node#5 would be 2+1+0 = 3. Add for all nodes and you get 26
@abhinavreddy3204
@abhinavreddy3204 4 ай бұрын
yep i had the same idea, using a map we can store depths of every node from root node and then we can just do dfs from root node adding contribution of every node i.e n*(n+1)/2 , where n is depth of the node from root node .
@junoc-s1720
@junoc-s1720 3 жыл бұрын
KZfaq finding yet another way to make me feel like an idiot
@RSolfactory
@RSolfactory 3 жыл бұрын
Tbf it doesn't need much inspiration
@brettkruskie2699
@brettkruskie2699 3 жыл бұрын
After I watched your interview with Clement, I was so impressed. Your ability to solve this complex problem was very inspiring. You had me subscribed from day 1. Continue to code!
@whitesalmon0925
@whitesalmon0925 4 жыл бұрын
as a high school student ??? Me: OK, shredding my university degree right now.
@fjdjzfhrsut8063
@fjdjzfhrsut8063 4 жыл бұрын
Nah man at least you got a degree. :/
@coolmonkey619
@coolmonkey619 4 жыл бұрын
Lol. Too bad you can't shred your student loans too
@nightshark1156
@nightshark1156 4 жыл бұрын
That's like seeing Michael Jordan play basketball and then going home and burning your hoop! People are better at things than you, but that doesn't mean they're better than you.
@ralphlagos4210
@ralphlagos4210 4 жыл бұрын
He's been at it for a lot longer than most, so he deserves it. US Competitive Coding medalist.
@maplestoryinchinese
@maplestoryinchinese 4 жыл бұрын
@@coolmonkey619 LMAO
@codearabawy
@codearabawy 4 жыл бұрын
I'm happy for you, William! I wish you all the best :)
@kakokapolei123
@kakokapolei123 3 жыл бұрын
11:57 "Does that make sense so far" "Yup" What you don't see is him quietly going on StackOverflow wondering what the hell he just said
@joaolourenco5279
@joaolourenco5279 3 жыл бұрын
Dudee the kid is impressive considering the fact he is in high-school, but this video is what you learn in like the 1st year of computer science in like 2 chapters (graphs and threes) in the subject algorithms and data structures.
@putinsgaytwin4272
@putinsgaytwin4272 3 жыл бұрын
@@joaolourenco5279 how does this apply to software engineering?
@joaolourenco5279
@joaolourenco5279 3 жыл бұрын
@@putinsgaytwin4272 it's because you are manipulating data structures with algorithms, ex:heaps.
@Arobisme
@Arobisme 3 жыл бұрын
@@joaolourenco5279 but when I've been graduated for 5 years and haven't done a single thing with trees since then. I forgot it all
@tusharsrivastava370
@tusharsrivastava370 3 жыл бұрын
@@joaolourenco5279 no it's not... And also it depends on your own tendency to grasp that stuff... I had data structures and algorithms in my 2nd year of college( I'm in 4th currently) and 95% of my classmates still don't know shit about it .. although I'm pretty good at it but the teachers in my college didn't teach us how to code it... They just taught it on a theoretical level and expected us to code it out ourselves... well of course it's better doing it on your own instead of someone teaching you the whole code but this is one of the reasons my friends still don't know shit about it lol
@dimsumpizza4746
@dimsumpizza4746 3 жыл бұрын
This must be how aliens feels like when they hear our language
@jazzymichael
@jazzymichael 4 жыл бұрын
I thought I was doing well because I could solve the first part... then they kept adding more and more complexity and I couldn't keep up lmao. I have to re-watch the second half of this video, great job.
@lilcraz851
@lilcraz851 2 жыл бұрын
At least u solved the first part
@Zorro9129
@Zorro9129 4 жыл бұрын
He is the chosen one to take down Google
@mr.washingtonsbuddy.8454
@mr.washingtonsbuddy.8454 3 жыл бұрын
You were supposed to destroy them, not JOIN them!!!
@Choconuss
@Choconuss 3 жыл бұрын
he looks like the lil Asian key maker in Matrix in that tiny room!! just way younger lol
@CharlieAligaen
@CharlieAligaen 4 жыл бұрын
Just watched your Mock interview with Clèment. Great job! I'm very impressed. I started coding for fun. Subbed! Looking forward to your future videos!
@pilarmaealcazar5139
@pilarmaealcazar5139 4 жыл бұрын
Wow inspiring, more video like this please for learning purposes. Thank you! 🙏🏻
@nursultandzhumabaev8943
@nursultandzhumabaev8943 4 жыл бұрын
Just imagine Clement wrote the problems in text with all the inputs...William would solve all of them like in 10min xD
@snehilkumar10
@snehilkumar10 4 жыл бұрын
Well, thats coding round. Its more like interview simulation. Interviewer dont give question in paper. They will give you example and then start with all your butt power..
@nathanc9050
@nathanc9050 4 жыл бұрын
24:19 Clement smiles when tmw makes progress 🙂
@eccomusic1386
@eccomusic1386 2 жыл бұрын
wow Bro . William's voice is so soothing . I can listen to his voice at night and fall asleep . I'm not implying that it is boring , instead it is very relaxing and it gives me tingles (like ASMR) .
@justicewillprevail1106
@justicewillprevail1106 9 ай бұрын
Great job!!!! I see a bright bright future ahead of you.
@iskandarsiraj9627
@iskandarsiraj9627 4 жыл бұрын
I’m watching this while eating even tho I don’t understand nothing but deep in side hoping I can understand what’s goin on 😂😂
@humzauddin6692
@humzauddin6692 3 жыл бұрын
bro same. the guy says: yeeeaaapppp, me : hmmmm nice.
@bulldozer8950
@bulldozer8950 3 жыл бұрын
Exactly maybe I’ll just gain some of this knowledge just through osmosis. Kinda like trying to eat your study guide before the test
@leoxiaoyanqu
@leoxiaoyanqu 4 жыл бұрын
William is definitely being humble and acting like in a real interview (slow down and communicate). Great to watch. Thanks for sharing. I actually came up with BFS in mind first and wonder am I missing anything here if using BFS (for the first two prompts)?
@matthewkyrmes3345
@matthewkyrmes3345 4 жыл бұрын
BFS should work fine too
@obamaobamna811
@obamaobamna811 2 жыл бұрын
Inspirational AF. Both of them hella good at what they do
@jatinkm
@jatinkm 3 жыл бұрын
You came up with the optimal solutions so quick!
@unconsciousmarty9393
@unconsciousmarty9393 3 жыл бұрын
And here i am 24 years old jobless getting rejected in all interviews
@xertz4267
@xertz4267 3 жыл бұрын
better days to come brother... many of us in the same situation. keep you head high!
@voltage3692
@voltage3692 3 жыл бұрын
Bhai koi baat hmare bhi din ayenge
@TapThatBootie
@TapThatBootie 3 жыл бұрын
Same here... got my bachelors back in October and still no job offers, only interviews with role play crap...
@sanjayk7661
@sanjayk7661 3 жыл бұрын
But your Sharma ji ka beta🙃
@CFCMAMO1
@CFCMAMO1 3 жыл бұрын
Keep optimistic my friend. It will come.
@zeroplays9915
@zeroplays9915 3 жыл бұрын
*I feel Like I got Smarter and big-brainier just by watching this guy ace this interview!*
@thearlowolf7336
@thearlowolf7336 3 жыл бұрын
Idk anything about coding but this video made me want to learn how to code! I been trying to find a hobby but this is fascinating and fantastic job!
@fernandomendes9914
@fernandomendes9914 4 жыл бұрын
Great Job William continue!
@will-ye
@will-ye 4 жыл бұрын
The colab we never knew we needed
@video-vocabulary
@video-vocabulary 4 жыл бұрын
Finally joining William Lin Fan Club, I hope tmw spirit will give me strength
@hanniballector3956
@hanniballector3956 4 жыл бұрын
Салам Алматыдан
@Holyblades1982
@Holyblades1982 4 жыл бұрын
I am sitting here at 4 in the morning and this came across my feed and I felt I had to watch the entire thing. I have been in IT since I was 14 and I will say I had no idea what the hell was going on the entire time lol. Took coding in high school but I knew in a few days it wasn't for me. Props to you man.
@soldiers303
@soldiers303 3 жыл бұрын
Same with me. First time I tried coding in Uni knew it wasn't for me. I guess it's one of those things, that you either understand or don't.
@ndntm
@ndntm 4 жыл бұрын
"just high school student" - funniest shit i've ever heard. Common high school student doesn't have almost 3k CF rating
@matthewwatts2338
@matthewwatts2338 4 жыл бұрын
For the 3rd problem, since you're only asked to return the sum of distances to the target node, I don't think you need another dfs. In the first dfs you updated the target node with the info you need. So after dfs1, ans = p.second - (target->sz) + (p.first - target->sz).
@amansinhparmar3336
@amansinhparmar3336 4 жыл бұрын
Clement is everywhere!
@tuanva6484
@tuanva6484 4 жыл бұрын
Like covid :))))
@kunal_chand
@kunal_chand 4 жыл бұрын
His connections are pretty strong.
@clem
@clem 4 жыл бұрын
I'm even in this comment thread! 😏
@54M4R7H
@54M4R7H 4 жыл бұрын
@@clem 🤯
@devendrasingh4776
@devendrasingh4776 4 жыл бұрын
@@clem 🤣🤣 nice algo expert...
@josephpark2093
@josephpark2093 3 жыл бұрын
I swear, I had also learned of everything in what was said here from an Algorithms book but I don't know it as thoroughly as him. I enjoyed this!
@pa8l0kool3
@pa8l0kool3 Жыл бұрын
im drunk rn but i will pay ALL my attention to this video, normally id for sure not watch this video bc of my pride but i LOVE this type of content bc i actually understand it. THANK YOU WILLIAM
@JA-jz2zj
@JA-jz2zj 3 жыл бұрын
he was hired at 30:10, jittery with voice change, lip bite, hair adjustment and turns of camera ... now that is nerd for love.
@morgansyoutubechannel
@morgansyoutubechannel 3 жыл бұрын
Well observed :D
@getreadyforthepunch3474
@getreadyforthepunch3474 4 жыл бұрын
i really thought this was an *interview* oh well this just passed through my feed lol
@yousefbeiruty6417
@yousefbeiruty6417 3 жыл бұрын
That's a hard question good job I am keeping watching your videos are so helpful improving my skills in understanding problems.
@pratickbhowmick4796
@pratickbhowmick4796 Жыл бұрын
Thanks, this was quite instructive!
@blameneeks
@blameneeks 3 жыл бұрын
That “and 5” really was his time to shine
@furroni9471
@furroni9471 3 жыл бұрын
Imagine being qualified for Google after High School. Nice work, I will follow your channel and see your progress, it's really interesting.
@user-gq7sv9tf1m
@user-gq7sv9tf1m 3 жыл бұрын
Being qualified and acing the technical part of the interview are different things
@jasonstarrising
@jasonstarrising Жыл бұрын
bro he is OVER qualified
@user-tz9jh6pv2j
@user-tz9jh6pv2j 3 ай бұрын
@@user-gq7sv9tf1m You'd be surprised. I have a classmate at Stuy HS who graduated with us at 15... he went to MIT and finished by 18. We were class of 2008. He was a VP at Google by 22.
@isaacmedlin1731
@isaacmedlin1731 3 жыл бұрын
I'm coming up in my senior year of college for software and I feel like I could of came up with these solutions but not nearly as fast. With a whiteboard and 3-5 hours it would be possible, but this guys quick with his thought process
@ritam8767
@ritam8767 3 жыл бұрын
The first question can be seen easily as a sequence. Each node in the rth row has depth (r-1) and there are 2^(r-1) such nodes. So it's just the sum of (r-1)*2^(r-1) where r goes from 1 to n, where n is number of rows. Correct me if I'm wrong.
@Pensive_117
@Pensive_117 2 жыл бұрын
Practice and passion makes someone good at something? Woah, I would've never guessed.
@rexcchao1759
@rexcchao1759 4 жыл бұрын
william seems to struggle with english more than the problems itself lol
@nexus5648
@nexus5648 4 жыл бұрын
I mean, English isn’t his first language so...
@mixedmaniac7957
@mixedmaniac7957 3 жыл бұрын
He's struggling with speaking itself more than the problem being language specific. The reason for that is because he's speaking while thinking of an actual solution to say on the spot.
@austindabomb9
@austindabomb9 3 жыл бұрын
He has better English than the interviewer or more understanding and that’s his second language
@nickwilson3499
@nickwilson3499 3 жыл бұрын
@@Milength when people ask him what languages he speaks, he says them in order of proficiency. First he says 1,200 programming languages then his native language then English.
@user-iy5zs4xs1n
@user-iy5zs4xs1n 3 жыл бұрын
@@nexus5648 it probably was im not sure. he got medal in IOI for the US and just graduated in Taipei American school(one of the most expensive schools in Taiwan)
@flandechocolate9675
@flandechocolate9675 2 жыл бұрын
crazy how freaking brilliant some people are
@AnRovik
@AnRovik 3 жыл бұрын
I'm actually a little jealous... I wish I had your passion at that age. Super impressive either way, you're an inspiration!
@vebexplaeya
@vebexplaeya 4 жыл бұрын
{0:16} Everyone's Gangsta (top right) until they see *Great Great Grandmaster* preparing for coding interview
@debadiptobiswas5611
@debadiptobiswas5611 4 жыл бұрын
😂😂😂
@dinokrivic5486
@dinokrivic5486 4 жыл бұрын
How the fuck did you see that?
@adhirajdeshmukh6813
@adhirajdeshmukh6813 4 жыл бұрын
Who is that ?
@Karthik-kt24
@Karthik-kt24 4 жыл бұрын
@@dinokrivic5486 +1
@amitnegi361
@amitnegi361 4 жыл бұрын
A much simpler solution for the second problem would be to just change one line of code from the first problem. ans += dep Becomes ans += dep * (dep+1) /2 which is the summation of all number 1 to dep. The logic behind it is that the node at depth 3 will be part of 3 subtrees. And the corresponding depth of that node for those subtrees will be 1, 2, 3. Similar for nodes at depth 1 and 2.
@Eric-bp3tc
@Eric-bp3tc 9 ай бұрын
Thanks buddy, now kindly go back to being a neet
@vaibhavmishra4505
@vaibhavmishra4505 3 жыл бұрын
For Prompt 2, an easier approach would be to find the depths of each individual node and just add their sums of AP up
@shivanshchakrawarti9289
@shivanshchakrawarti9289 10 ай бұрын
yes was wondering why he didn't do that , he just needed to update one line
@arthg893
@arthg893 10 ай бұрын
@@shivanshchakrawarti9289 can you explain that to me? i’m a bit lost, and if you could can you let me know how he added the mode depth and how they got 16 and 26
@brianchallita1050
@brianchallita1050 8 ай бұрын
The complexity of this algorithm would be huge
@shivanshchakrawarti9289
@shivanshchakrawarti9289 8 ай бұрын
No @@brianchallita1050
@RegisteredLate123
@RegisteredLate123 7 ай бұрын
exactly
@user-hc1hh8er6i
@user-hc1hh8er6i 8 ай бұрын
this guy nailed it easily .. he's young, sharp, still flexible . I wish parents was more caring about their children learning good stuff in their free time instead of wasting time on social networks and wasting time on other stuff .. this guy is amazing . I wish my kid one day will be even x10 sharper ! XD
@shikharsav
@shikharsav 2 жыл бұрын
I do work at Google (as or writing this), but these are my personal thoughts. First of all I want to say great job Clement and William. I have really enjoyed your videos and want to thank you guys for the great content. William, you are definitely impressive and have a very good chance of acing your Google Interviews if you choose to give them. One issue in these interviews is the subconscious bias - Clement knows how good William is so even though he tries to be fair and unbiased he is more likely to give William the benefit of the doubt than an average interviewee would get. For instance the solution for the 3rd problem has some issues - they are pretty basic ones and something that are trivial to catch if you're coding in an IDE (can you spot them?). Still that's something that I (and I guess the average Google interviewer) would bring up after the candidate has written code. Won't impact my hiring decision though.
@aryatyagi4648
@aryatyagi4648 4 жыл бұрын
_MEANWHILE MY TEACHER - TAKE INPUT AND PRINT THE EVEN NO._
@Slade69
@Slade69 3 жыл бұрын
Also palindrome.
@prakashsharma5306
@prakashsharma5306 3 жыл бұрын
Fibonacci series
@code5829
@code5829 3 жыл бұрын
That is why I’m dropping out when I turn seventeen. Waste of time.
@yagnapatel3912
@yagnapatel3912 3 жыл бұрын
@@code5829 A Highschool diploma is still important to have. As someone with many siblings I’ve seen how hard it can be for someone even with a college degree to find a job. Please don’t drop out.
@yiyi2949
@yiyi2949 3 жыл бұрын
@@code5829 listen to the comment above me. Wishing you the best
@mukulpanchakarla8944
@mukulpanchakarla8944 4 жыл бұрын
Keep up the good work clement..could you please make a video on commanly used approaches or ways to solve competitive programs with william
@steakiefrags1866
@steakiefrags1866 3 жыл бұрын
I am happy that i could solve the first problem without trouble
@milochenmilochen
@milochenmilochen 2 жыл бұрын
For the 3rd question, even adding the parent node is helpful for using DFS/BFS to solve the problem, but your creative thinking for this question is so cool and the coding for the last question is so amazing. If the interviewee ask to figure out all sumDist for all node, then this solution only need O(N). But the way to add parent node will need O(N^2).
@karankumarmageswaran1550
@karankumarmageswaran1550 Жыл бұрын
adding parent node would be really helpful, but i'm not so sure an interviewer would allow it. the stuff he added can be directly calculated without changing the input type using functions he previously created. adding a parent node, however, cannot be done without changing the input, or creating a new function to store the parent node for every node
@tusharsrivastava370
@tusharsrivastava370 3 жыл бұрын
I'm 21 and pretty ok at programming, I'm amazed how fast this dude's brain works (talking about the rest of his kickstart videos cuz this one was pretty straightforward except the 3rd problem cuz it was genius of his to design that formula so quick). I wish I didn't go to college and instead I coded day and night to reach his level at that age lol
@letsgameco3514
@letsgameco3514 Жыл бұрын
So he did these challenges before, why he did it so fast :D So if you practice codewars a lot, can did the same
@alessiodaini7907
@alessiodaini7907 11 ай бұрын
don't worry these problems are easy and his solutions are more complex than they're supposed to be.
@MrTeslaX
@MrTeslaX 4 ай бұрын
you dont reach this level by coding. William is a certified genius with very high IQ
@abhinavreddy3204
@abhinavreddy3204 4 ай бұрын
for the 3rd problem you can simply do the bfs from the given node and add all the depths to calculate the final ans . the trick is to add parent pointer to every node similar to the left and right pointer, you can store the parent pointer's in a map .
@tusharsrivastava370
@tusharsrivastava370 4 ай бұрын
@@abhinavreddy3204 thanks, but now that I’m working I realise worrying about all of this was pretty stupid. You barely ever need to make use of these irl… just like all those math problems where the character used to buy 1000 watermelons lol
@lonelypotatojinneverfound378
@lonelypotatojinneverfound378 3 жыл бұрын
"Does it make sense?" No, it doesn't but still gonna watch it
@z08840
@z08840 3 жыл бұрын
for last problem - if you make tree non-directional (by adding parent pointer to each node) you can treat any node as a root for whole tree and apply solution of the second problem
@MrBUDGIESROCK
@MrBUDGIESROCK 4 жыл бұрын
Im not the only one mesmerized by his pen flipping, right?
@casperd2100
@casperd2100 4 жыл бұрын
you mean... pen spinning?
@tackywacky99
@tackywacky99 4 жыл бұрын
every asian can do that. dont you know?
@hpeets9116
@hpeets9116 4 жыл бұрын
Very entertaining William. I watched the whole thing, couldn't understand the other dude tho. I guess you should take the AP CS test for me now thanks!!!!!
@bigkurz
@bigkurz 4 жыл бұрын
Dang bro you killed that problem. Highly impressive
@lotr_may
@lotr_may 3 жыл бұрын
Congrats William! You crushed it at IOI!
@bri-bri8536
@bri-bri8536 3 жыл бұрын
I had no idea what was going on...but i found it interesting and watched the whole thing
@unmy400
@unmy400 4 жыл бұрын
and here i am, happy because I just moved a div to the center :)
@omanx-
@omanx- 4 жыл бұрын
Nice Video!!
@brandijohnson1326
@brandijohnson1326 4 жыл бұрын
Good job young man!
@gianni50725
@gianni50725 3 жыл бұрын
Man he got an IOI silver medal, this has to be pure lightwork for him lol
@username_kk2177
@username_kk2177 8 ай бұрын
He got top in the world the next year too 👀 This guy's insane
@manjunathvasam4981
@manjunathvasam4981 4 жыл бұрын
the beginning looks like a movie intro:)
@lakshyatripathi8624
@lakshyatripathi8624 11 ай бұрын
I could think of the first solution in about 5 seconds and I'm a happy person not even gonna watch the rest for a next few weeks unless I'm good enough to be able to do the second one too.
@richardhorvatichfittrader
@richardhorvatichfittrader 3 жыл бұрын
I wish you would make videos themed on how you got good. Timeline, skills acquired, projects from first to recent, how long do you practice daily, what have you studied, what do you suggest for people to get good or to your level?
@yunfeiluo5613
@yunfeiluo5613 4 жыл бұрын
Thanks for the great coding interview. I tried to write my own solutions before I continued watching your solutions. And I just attached my codes here. Problem 1: Besides the ordinary dfs, I also wrote a one-line solution that works. int sumDepths(Node* root) { return root ? 2 + sumDepths(root->left) + sumDepths(root->right) : -1; } Problem 2: Actually, you can modify your previous dfs solution to get the answer. Suppose the node in the entire tree has depth 3, then node in the subtrees (including the entire tree) has depths 3, 2, 1, 0, sum to 6. That is true to each node. Thus, int ans = 0; void dfs(Node* root, int d) { ans += d * (d + 1) / 2; // instead of d if (root->left) dfs(root->left, d + 1); if (root->right) dfs(root->right, d + 1); } Problem 3: I wrote a one-pass solution, but it took me thirty minutes... vector find(TreeNode* root, TreeNode* target) { // 0: found target or not(0/1) // 1: number of nodes // 2: sum of dists // 3: dist to target from nodes above / for node below, we don't care if (!root) return {0, 0, 0, 0}; vector l = find(root->left, target), r = find(root->right, target); // sum the distances we have so far int sd(l[2] + r[2]), da(0); if (!l[0] && !r[0]) { // haven't found target // add up extra dists to current node // which equal to the sum of nodes below sd += l[1] + r[1]; } else if (l[0]) { // found target on left branch // update the dist from curr node to target da = l[3] + 1; // add up extra dists of all nodes on right branch to target // plus the dist of curr node to target sd += (level + 1) * r[1] + level; } else { // found target on right branch // update the dist from curr node to target da = r[3] + 1; // add up extra dists of all nodes on left branch to target // plus the dist of curr node to target sd += (level + 1) * l[1] + level; } return {root == target || l[0] || r[0], l[1] + r[1] + 1, sd, da}; } int solve(TreeNode* root, TreeNode* target) { return find(root, target)[2]; }
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
I have different simplified and smarter aproach to handle this problem.
@broefkip
@broefkip 4 жыл бұрын
And I'm just sitting here: "Yea, I've got a big tree at home too!" I got lost so fast... :/
@jacksonrichter66
@jacksonrichter66 4 жыл бұрын
you're a super smart dude... big things are in your future
@BuddyReviewTruyen
@BuddyReviewTruyen 3 жыл бұрын
U're really a monster algorithms and coding ... niceee
@masteryehudi7031
@masteryehudi7031 3 жыл бұрын
When he says, "hmmm, k so... k so I think..." that's equivalent to about 4 days of thinking time for me
@ron-davin
@ron-davin 4 жыл бұрын
easy peasy for William lol
@YouTuber-vl7dw
@YouTuber-vl7dw 4 жыл бұрын
Bro I love ur content
@elohimgod2799
@elohimgod2799 3 жыл бұрын
People don’t feel bad some are just gifted in certain stuff, you are gifted in different ways, everyone has it’s gift.
Advice from the Top 1% of Software Engineers
10:21
Kevin Naughton Jr.
Рет қаралды 3,2 МЛН
Google Coding Interview With A High School Student
57:24
Clément Mihailescu
Рет қаралды 4 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 11 МЛН
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 63 МЛН
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 8 МЛН
Winning Google Kickstart Round C 2020
30:57
William Lin
Рет қаралды 3,9 МЛН
a day in the life of an engineer working from home
8:42
Joma Tech
Рет қаралды 20 МЛН
How I Cracked the Google Coding Interview (from unemployment)
12:44
Almost Failed MIT Class: My First Semester at MIT
8:26
William Lin
Рет қаралды 402 М.
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin
Рет қаралды 9 МЛН
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
Solve This Coding Problem and Win $200
8:06
Kenny Gunderman
Рет қаралды 2,4 МЛН
Easy Google Coding Interview With Ben Awad
28:00
Clément Mihailescu
Рет қаралды 998 М.
Starting Competitive Programming - Steps and Mistakes
9:55
William Lin
Рет қаралды 1,4 МЛН
Doing LeetCode Be Like (Coding Interviews Be Like Pt. 2)
4:41
Nicholas T.
Рет қаралды 745 М.