Тёмный

Solving Google Code Jam Qualification Round 2020 A-D 

William Lin
Подписаться 395 тыс.
Просмотров 59 тыс.
50% 1

I try to solve Google Code Jam Qualification Round 2020 problems while explaining my thinking process.
A: 00:45
B: 05:53
C: 12:10 (O(nlogn) solution)
D: 26:38
Unfortunately, my solution to E is too complicated for me to explain :(
If this was helpful, consider liking or subscribing!
Website: williamlin.io/
Instagram: / tmwilliamlin168
Twitter: / tmwilliamlin168

Игры

Опубликовано:

 

24 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 185   
@S4ND1X
@S4ND1X 4 года назад
I feel great because even thought I could only solve A-C, but for all of them I did the exact same thing as you, so It really gives me a boost of confidence to see that my practice is paying off
@aamnasayyed
@aamnasayyed 4 года назад
How long do you practice per day?
@S4ND1X
@S4ND1X 4 года назад
@@aamnasayyed Between college and home chores like 3 hours a day
@dhananjaysonawane1996
@dhananjaysonawane1996 4 года назад
Same here! I solved 2 (almost there with 3rd).
@aamnasayyed
@aamnasayyed 4 года назад
@@S4ND1X Great! How long did you continue this routine?
@GiamSaas
@GiamSaas 4 года назад
@@S4ND1X can a boy of 16 yrs old learn this?
@tmwilliamlin168
@tmwilliamlin168 4 года назад
Please read the description, I quote the rule (with the link) which says people are allowed to "share information" (which includes both ideas and codes) during the qualification round.
@kartikbhatia4940
@kartikbhatia4940 4 года назад
What is the very meaning of keeping a qualifying marks of 30 marks ? if we are allowed to see online solutions of this contest ? This is against the spirit of Competitive programming merely for likes and subscribers you should not be doing this ! I didn't expect it from you !
@tmwilliamlin168
@tmwilliamlin168 4 года назад
The qualification round was intended for Google to give beginners a chance to learn, that's why Google made it 24 hours, and it was never intended to be a serious contest. There are future rounds in Code Jam which will ensure the competitiveness of the contest. I just wanted to help beginners (perhaps this is their first ever round) who are really trying hard to qualify.
@rajatchaudhari1228
@rajatchaudhari1228 4 года назад
@@kartikbhatia4940 Qualification Rounds are basically to promote competitive programming I guess, so its fine to discuss. Else, the rules would have stated that you are not allowed to discuss, and maybe would have organised a qualifier of 2.5 hours to 3 hours.
@kartikbhatia4940
@kartikbhatia4940 4 года назад
@@tmwilliamlin168 Codechef Long challenges also last more than 24 hours but even discussion for them is prohibited it is sad to know that Google allowed discussions during the contest itself ! No hard feelings with you but just amused about How The qualifier round is not a serious one :( ! Looking forward to more of your videos and your nice explanations ! :) Happy Coding !
@tmwilliamlin168
@tmwilliamlin168 4 года назад
I know it might be sad for some people who tried these problems, but isn't it better to get more people involved in CP? Imagine a beginner who realizes that he can't even solve the second question and just forgets about CP entirely before the round even ends, versus if he had seen the solution earlier and thought "Actually, this doesn't seem that hard. With more practice, I can definitely become better at this!".
@josephli2119
@josephli2119 4 года назад
"Which one should I write" Imagine being so massive brain that you have multiple solutions and have to decide which one to use
@plusequalminusk4203
@plusequalminusk4203 4 года назад
I'm going to be honest, I can't even comprehend what you're trying to do, but I still like watching your videos nonetheless.
@leonardsmith9085
@leonardsmith9085 4 года назад
I legit thought I was the only one 😂😂😂
@tamasfeka5026
@tamasfeka5026 4 года назад
i learned some programming on a very basic level but idk what the F hes doing 🤣 it's just good to listen to, like an asmr :D
@LEEH_1
@LEEH_1 4 года назад
Same
@yournan7249
@yournan7249 4 года назад
@@tamasfeka5026 facts
@dutchboybmx
@dutchboybmx 4 года назад
I have no idea what you're doing, but that makes me all the more inspired to learn all I can about math and computer science.
@kay8108
@kay8108 4 года назад
Me reading my coding exercise: ok now how im gonna do this? Lin just completed reading: ok i have an idea....actually i have 2
@buzy6782
@buzy6782 4 года назад
Watching you solve problems is like an art. I can't seem to look away no matter how hard I try. I need to start learning the basics of cp!
@jasondolorso
@jasondolorso 4 года назад
I love how more explanatory you are now.
@dhananjaysonawane1996
@dhananjaysonawane1996 4 года назад
I find this way of learning more helpful than reading editorial! Please make more such videos for codeforces rounds as it has a better question set compared to other OJ's (Leetcode, codechef, etc). Thanks William! :)
@Avighna
@Avighna 11 месяцев назад
Yes please!
@NavrajNat
@NavrajNat 4 года назад
You should continue to make videos where you think aloud. It’s really helpful to someone like me whose trying to get better at algorithm problems. It provides such great perspective. Keep up the great videos.
@imdeadshot3632
@imdeadshot3632 4 года назад
well i spent hours to solve first 3 and you did in minute! TEACH ME SENPAI!!!
@sssssingh
@sssssingh 4 года назад
WoW Your are growing really fast! Congrats!
@mayankmittal6552
@mayankmittal6552 4 года назад
Doing it this way is far better as one can understand and follow what you are upto. Furthermore many have problems implementing the solution (I knew for D but couldn't implement it), it really helped me watching how you coded the solution.
@Chris-qn2io
@Chris-qn2io 4 года назад
Hey William, question why you always increment your i's in your for loop beforehand rather than after?
@marwannabileldeep4513
@marwannabileldeep4513 4 года назад
dude will you make a video for today's atcoder contest ?
@kartaLaLa
@kartaLaLa 4 года назад
Hands: Yes Eyes: Yes Brain: No
@ajourney179
@ajourney179 4 года назад
Hello William Lin, since you have experience of code jam round 1. what is the difficulty of round 1 problems as compared to codeforces division 2.
@alessandrobiaggi2965
@alessandrobiaggi2965 4 года назад
I LOVE YOU ❤️ I participated too with a final score of 75
@kamalhm-dev
@kamalhm-dev 4 года назад
Hey William, I see you're not even in Uni yet but your skills are impressive. At what age did you get introduced to CS?
@siddusiddhartha171
@siddusiddhartha171 4 года назад
could you please make a video on how to setup vim with c++ for CP?
@beinevitable1797
@beinevitable1797 4 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89SNg8V-ifM.html I think this video might help
@XSTEVEN722X
@XSTEVEN722X 4 года назад
FYI for problem A with sets you can do s.insert(value).second which will return true if the value was successfully added to the set, meaning it wasn’t already in the set. And it will return false if it’s already in the set (a duplicate exists). Also if a duplicate exist you can break from the inner loops and increment the counter.
@kairatopa9564
@kairatopa9564 4 года назад
Or maybe after inserting elements into set check if s.size()!= n then count++
@bensonyuan5083
@bensonyuan5083 4 года назад
I solved the scheduling problem by sorting by start time as well! 1) When do we sort by end time when do we sort by start time? 2) Can you point to resources for greedy algo for selecting the maximum number of independent ranges?
@henry145
@henry145 4 года назад
When sort with end time that means u want to join as much activities as possible because the earlier it finish the earlier u can join the other activities. But this question is about overlapping, so the earlier it starts the smaller the risk that will overlap.
@r0l3ex20
@r0l3ex20 4 года назад
When you are typing you are useing "Home row position"?
@sktechguide7780
@sktechguide7780 4 года назад
Dude.You are the best.😎 Can you please tell me the keyboard that you use while doing competitive typing?I actually want to buy a keyboard like yours. It seems like a superior one.😅 Thanks in advance.
@MohammadSuleman008
@MohammadSuleman008 4 года назад
Why you uploaded this video before the end of contest? Is it not against the rule of code Jam?
@rahmanyt
@rahmanyt 4 года назад
though ide doesn't do anything in coding... just to know... which ide do u use?
@rajatchaudhari1228
@rajatchaudhari1228 4 года назад
Eagerly waiting for your tutorial videos!!
@tmwilliamlin168
@tmwilliamlin168 4 года назад
This is kind of the tutorial... I explain my solutions as I solve the problems
@subhajitmanna305
@subhajitmanna305 4 года назад
@@tmwilliamlin168 Can you please provide why the greedy approach works for the third problem or any resource would be fine! Thanks
@praharshsingh2095
@praharshsingh2095 4 года назад
Dont fall into the Tutorial Trap.Go the Hard WAY
@subhajitmanna305
@subhajitmanna305 4 года назад
@@praharshsingh2095 You mean using bipartite concept ?
@praharshsingh2095
@praharshsingh2095 4 года назад
@@subhajitmanna305 Haha Good One :P
@29saiharsha
@29saiharsha 4 года назад
Thanks for inspiring me man I'm also striving to qualify for ioi
@ztrixx3280
@ztrixx3280 4 года назад
Upload more of these typa explanatory videos...New Sub btw!
@nuralisadibekov7672
@nuralisadibekov7672 4 года назад
it's pretty cool font in your text editor)
@TheAceInfinity
@TheAceInfinity 4 года назад
If you read the example interaction, the change actually does happen after the query but before you read the response (which is admittedly confusing at first). This makes the change negligible for the first query since you still receive the bit value AFTER the manipulation. The format and the testing tool kind of messed me up for time though too. I think the bit position direction (MSB or LSB) was a bit ambiguous also which caused me time as well haha. That Sample Interaction was what I should have been reading instead of the textual description of the problem I think.
@namanagrawal1908
@namanagrawal1908 4 года назад
just subscribed after watching this video.. very inspiring..
@ankitkumarsharma9837
@ankitkumarsharma9837 4 года назад
Why did you confirmed "later starting time"? Why is it needed?
@prashantiyer6659
@prashantiyer6659 4 года назад
Hey William can you please do a video on how to practice to become better at CP?
@abubakaraftab4423
@abubakaraftab4423 3 года назад
In the first question instead of checking duplicates we can just check wether the size of set is equal to n or not if it is not then we increment it
@shivrajbhatti1074
@shivrajbhatti1074 4 года назад
Why is the soln for parenting partnering (3rd Q) in O( NlogN )?? That would mean the assignment loop goes on for logN time, but i dont understand why?? plz help🙌
@karanbobade5266
@karanbobade5266 4 года назад
Hey william, could you please explain, how C could have been solved using bipartite graph
@marmikpatel9261
@marmikpatel9261 4 года назад
What are the specs of your programming device?
@magirescutudor7148
@magirescutudor7148 4 года назад
I solved A-C in around 25 minutes, got a code for D in 30 more minutes, stare at the monitor for around 1 hour to find a mistake, then finding a case where it would WA, but i still don't know how to solve the 2nd subtask of E
@kingfisher3791
@kingfisher3791 4 года назад
Which screen recorder u r using
@ATGamerHTZ
@ATGamerHTZ 4 года назад
You can create a programming course. And maybe use google exercises to teach us. or just take the previous kick start, and make videos teaching how to solve step by step calmly and such. it's just an idea, I would follow all the videos
@vivekmishra4994
@vivekmishra4994 4 года назад
Hi. I used to do CP in Python but during code jam i realized that it is too slow. So I switched to C++ during the contest(also u cannot use Python in ioi). Can u tell me how did you learn cpp (source)and how u got better and better
@secularph8424
@secularph8424 4 года назад
ioi??
@vivekmishra4994
@vivekmishra4994 4 года назад
@@secularph8424 international Olympiad of informatics (foe high school students only)
@secularph8424
@secularph8424 4 года назад
@@vivekmishra4994 ok
@shashibhushanrajput2461
@shashibhushanrajput2461 4 года назад
Awesome Man
@yacinmessaoud186
@yacinmessaoud186 4 года назад
Thanks for the effort !
@mangai3599
@mangai3599 3 года назад
Which code editor he is using?! Anyone know the name of the editor?? I like that.
@samarjitdeshmukh4845
@samarjitdeshmukh4845 4 года назад
I started practicing last Sunday and was only able to solve the first problem.
@krsaditofficial
@krsaditofficial 4 года назад
Hey William, would you recommend me how to start competitive programming i.e resources etc.
@tmwilliamlin168
@tmwilliamlin168 4 года назад
Hopefully I can finish that video within the next 12 hours
@Mike-mw1fu
@Mike-mw1fu 4 года назад
William Lin Which editor do you use ?
@Jay-wb7hw
@Jay-wb7hw 4 года назад
study student vim
@animenerd_
@animenerd_ 4 года назад
Bro, I was so disheartened because I couldn't even think of an approach to E.. 😂 Now I feel better seeing grandmasters like you think E's not easy..
@AyushGupta-mm4jg
@AyushGupta-mm4jg 3 года назад
ok pritishn
@animenerd_
@animenerd_ 3 года назад
@@AyushGupta-mm4jg lol, i should have changed my profile pic 😂
@scoopedcontent
@scoopedcontent 4 года назад
Are you sure about this? I mean qualification round is still active.
@tmwilliamlin168
@tmwilliamlin168 4 года назад
See the description, I quote the rule which says people can discuss during the qualification round.
@zoompie6786
@zoompie6786 4 года назад
Discuss, not to copy the code..
@tmwilliamlin168
@tmwilliamlin168 4 года назад
Google states it as "sharing information", which includes sharing ideas and code.
@scoopedcontent
@scoopedcontent 4 года назад
You're the best jugde for that I just didn't wanted you to get banned. Btw am so in love with this series of yours it is really helpful. Please share something about your journey as well.
@omarbahgat5568
@omarbahgat5568 4 года назад
@@tmwilliamlin168 Bro how did u customize ur tabs to glow green like that. And can u do a setup video
@shivangawasthi8750
@shivangawasthi8750 4 года назад
Can you please explain when to sort by start time and when by ending. I was trying to solve 3rd by sorting ranges with ending time and i am having hard time.
@naveenrawat6278
@naveenrawat6278 4 года назад
You can do it by sorting on ending times. The issue most people had was that when both J and C were available, they were assigned jobs in a fixed manner irrespective of who gets free first.
@user-ir2ie3yv7m
@user-ir2ie3yv7m 4 года назад
انت مبدع وعبقري حقيقة,,,,,, البرمجة تصيب الشخص وجع الرس كيف تتغلب الملل ,,كيف تصنع الشغف في حب البرمجة بما انك محترف برمجة؟شكرا لك.
@The001Shubham
@The001Shubham 4 года назад
Can you please make a video on how to tackle a DP problem ..
@anchalvatre2594
@anchalvatre2594 4 года назад
which font you use
@templetherapy
@templetherapy 4 года назад
can u make a vid on how u learned
@aaronwang3387
@aaronwang3387 4 года назад
For D, shouldn’t you also have to have some dummy qry() in findchange() to account for the short circuiting? Otherwise wouldn’t it cause the queries to be misaligned with the changes? Great video btw hahaha
@tmwilliamlin168
@tmwilliamlin168 4 года назад
Yes, I fixed that during the debugging session but I forgot to mention that in the video
@secularph8424
@secularph8424 4 года назад
The second problem I did it by keeping track of number of opening parenthesis and closing it with (currently opened - next number ) How different is my approach with his Anyone pls explain If my question is confusing jus comment i can elaborate
@Amit_Kumar_1999
@Amit_Kumar_1999 4 года назад
I sorted the activity with their end time because i thought that it would be related to exchange argument & and got 6 Wrong attempts. Can you point out why sorting by ending time solution fails.
@subhajitmanna305
@subhajitmanna305 4 года назад
same went for me, got 7 wrong attempts. even I was trying to figure out. Let me know if you find out anything.
@Amit_Kumar_1999
@Amit_Kumar_1999 4 года назад
@@subhajitmanna305 discuss.codechef.com/t/google-code-jam-2020-problem-3/60303/12
@Amit_Kumar_1999
@Amit_Kumar_1999 4 года назад
or check out with this test case 1 5 1 4 0 200 50 100 150 300 250 270
@subhajitmanna305
@subhajitmanna305 4 года назад
@@Amit_Kumar_1999 Thanks here! But I am not to figure out how to proof this greedy approach works here.
@Amit_Kumar_1999
@Amit_Kumar_1999 4 года назад
@@subhajitmanna305 Proof is the tricky part of greedy solution. As i earlier mentioned that i felt this is related to Exchange Arguments. So i think just check out these. You might get something . Also if you found something mention here or mail me offamitkumar[at]gmail[dot]com
@SayanDasezioauditore
@SayanDasezioauditore 4 года назад
Why does sorting by end time not work
@marcuslee678
@marcuslee678 4 года назад
Thanks William!
@marcuslee678
@marcuslee678 4 года назад
After watching ur vid, I realize the way I approach Q4 is totally all wrong 😅
@parvgour5284
@parvgour5284 4 года назад
please make a video on the solution of problem E of code jam 2020...
@cartoons__for__kids_Hindi
@cartoons__for__kids_Hindi 3 года назад
What are these kind of problems known as, where can I start ?
@ArshadKhan-cb4do
@ArshadKhan-cb4do 4 года назад
Whii programming language you use c++
@97lovechina
@97lovechina 4 года назад
What s his vim font?
@Drytube
@Drytube 4 года назад
Please make a set video of vim with C++.
@psychoticgamer6853
@psychoticgamer6853 3 года назад
That mechanical keyboard was good
@adityatrivediii
@adityatrivediii 4 года назад
Please share your Chrome theme! looks nice
@adityadhane5917
@adityadhane5917 4 года назад
Is that vim?
@harishankerchauhan2826
@harishankerchauhan2826 4 года назад
Sir please solve the questions of CODEVITA and share that video with explanation.
@MasabFarooque
@MasabFarooque 4 года назад
Panther Tech supports you.
@GibbaBites
@GibbaBites 4 года назад
Why do u still use windows at this point?
@PrajwalSSYMCA-qx5yw
@PrajwalSSYMCA-qx5yw 2 года назад
anybody know which software he is using.
@ermolaevatania
@ermolaevatania 4 года назад
how do you hire this person?
@lw03070
@lw03070 2 года назад
what am i watching? where am i ? I was watching NHL earlier, and now I am here.
@subhajitmanna305
@subhajitmanna305 4 года назад
awsome!
@alfredoterrero2963
@alfredoterrero2963 4 года назад
What’s your github?
@sajjad.h
@sajjad.h 4 года назад
The contest is running... How you can upload solution when contest is running?
@tmwilliamlin168
@tmwilliamlin168 4 года назад
See the description, I quote the rule which says people can discuss during the qualification round.
@abhishekgautam2693
@abhishekgautam2693 4 года назад
@@tmwilliamlin168 I believe that discussion and showing solution code is different. But anyways I'll watch it tomorrow ❤️, thanks
@tmwilliamlin168
@tmwilliamlin168 4 года назад
It's not limited to discussing, Google describes it as "sharing information", which includes all of discussing and showing solution code.
@jaichhabra6849
@jaichhabra6849 4 года назад
help me with q 5
@aw12sdfx
@aw12sdfx 4 года назад
love you my idol
@kylexie7579
@kylexie7579 4 года назад
waiting for your E dude. Solved A-D in 3hrs but have not idea on E totally...maybe your facecam for solving that problem is okay, no need to explain
@FoodieKing
@FoodieKing 4 года назад
Now see the subscribers tomorrow morning .😁😁.. Subscribers gain krne ki ninja technique
@nikhillondhe5815
@nikhillondhe5815 4 года назад
The competition is still on right?
@tmwilliamlin168
@tmwilliamlin168 4 года назад
See the description, I quote the rule which says people can discuss during the qualification round.
@nikhillondhe5815
@nikhillondhe5815 4 года назад
@@tmwilliamlin168 Great! But the link is broken. You added a ':' at the end.
@tmwilliamlin168
@tmwilliamlin168 4 года назад
Thanks for letting me know!
@ashutosh6060
@ashutosh6060 4 года назад
Why did you leave E? Its not codechef challenge problem :D
@ashutosh6060
@ashutosh6060 4 года назад
Sorry i didn't watch till end that time. Now i know why E is missing.
@RishabhSharma10225
@RishabhSharma10225 4 года назад
WE WANT SOLUTION TO E !!!
@yugeshnukala949
@yugeshnukala949 4 года назад
which application you are using to write your codes????
@akhilgunti7540
@akhilgunti7540 4 года назад
Can you please create a programming course mainly focussing on recurrsions and dynamic programming..btw great work bro..
@steevecastor6514
@steevecastor6514 4 года назад
My understanding of recursion is that a function calls itself, until it reaches its base case. for example , if you're trying to find the factorial of an integer you can do: public int factorial(int n){ if(n==1) return 1; // this is the base case, once the function reaches this case it returns 1; // the factorial of 1 is just 1. // if your function does not have a base case the function will loop infinitely until your machine runs out of memory. else return n*factorial(n-1); /*this is the recursive case, the function calls itself until it reaches the base case. For example if n=3, then the factorial of 3 = 3 * factorial(2), the function then needs to find the factorial of 2. What that is is just 2 * factorial(1). and the program knows that the factorial of 1 is just 1. So it multiplies 2*1 and returns it to the function calling it. So now the original function we called has an equation that looks like this --> 3* 2 and this equals to 6 so the factorial of 3 is 6. }
@steevecastor6514
@steevecastor6514 4 года назад
hope my explanation helped.
@xvzf115
@xvzf115 4 года назад
With facecam
@tusharsrivastava370
@tusharsrivastava370 3 года назад
Me after reading the first problem : It's easy On the 2nd : I can do it if I try hard 3rd : God, forgive me for I have sinned
@cartoons__for__kids_Hindi
@cartoons__for__kids_Hindi 3 года назад
Where do you practice
@sanskargupta6791
@sanskargupta6791 4 года назад
It's an ongoing contest. Why did you share the solutions??
@tmwilliamlin168
@tmwilliamlin168 4 года назад
See the description, I quote the rule which says people can discuss during the qualification round.
@kushagrasahni9708
@kushagrasahni9708 4 года назад
@@tmwilliamlin168 Bro I don't think that's fair because this way everyone will qualify the round. It'd be better if you remove this now and upload it tomorrow.
@nithishkumarsaravanan4251
@nithishkumarsaravanan4251 4 года назад
Looking cute in Black t-shirt...Lol😂
@youngchung8730
@youngchung8730 4 года назад
When will you be hired to Google? Lol
@artworld8586
@artworld8586 4 года назад
Anybody know which software he is using for coding 🤔🤔🤔
@lostlong62
@lostlong62 4 года назад
lol people who say this is cheating, why you click it???
@chienyo8480
@chienyo8480 4 года назад
First query:😢
@timothygao9442
@timothygao9442 4 года назад
bro this man reads so fast
@yashkumar8472
@yashkumar8472 4 года назад
GOD ...Hi
@scottchilds6676
@scottchilds6676 4 года назад
Can you make a program to eliminate corona virus thanks
@vaibhavgupta7429
@vaibhavgupta7429 4 года назад
what are you drinking..?
@zulqadaridrishi457
@zulqadaridrishi457 3 года назад
Achha to Kerala wale malyalam bolte h 😅
@fuadf.7842
@fuadf.7842 4 года назад
What the f is going on this vid. No idea
@BrijeshYadav-xu5kj
@BrijeshYadav-xu5kj 4 года назад
competition is still going on
@tmwilliamlin168
@tmwilliamlin168 4 года назад
See the description, I quote the rule which says people can discuss during the qualification round.
@BrijeshYadav-xu5kj
@BrijeshYadav-xu5kj 4 года назад
@@tmwilliamlin168 Still u should have not uploaded it, i lost motivation to solve question further because now people will just copy paste the code
@tmwilliamlin168
@tmwilliamlin168 4 года назад
Yea, I understand that there are drawbacks, but the purpose of this round is to give beginners a chance to get involved with these competitions and not for actual competition. If the competitiveness is your motivation, then you will have that motivation in future rounds.
Далее
Google Kickstart Round B 2020
1:37:36
Просмотров 149 тыс.
Interview with a Competitive Programmer
25:13
Просмотров 1,2 млн
King's Field. Из неё появилась Dark Souls
37:47
ЭТО НУЖНО КАЖДОМУ ПАБГЕРУ
16:01
Просмотров 174 тыс.