I Tried To Speedrun LeetCode MEDIUMS

  Рет қаралды 35,746

Colin Galen

Colin Galen

Күн бұрын

In the last speedrun, I gave myself an hour to do as many LeetCode easies as possible... and took out 53. In this one, I still have an hour, but now the goal is to do at least 20 mediums. Can it be done?
The questions I did (note that the video’s a bit out of date): leetcode.com/problemset/algor...
Music
This Is For You (Prod. by Lukrembo)
Link : • lukrembo - this is for...
Dreams by Bensound
www.bensound.com
Support by RFM - NCM: bit.ly/2xGHypM
Local Forecast - Slower by Kevin MacLeod
Link: incompetech.filmmusic.io/song...
License: [yt dislikes this link, removed]
Timestamps
0:00:00 Intro
0:01:06 Speedrun
1:00:07 Conclusion

Пікірлер: 63
@johnvanschultz2297
@johnvanschultz2297 6 ай бұрын
Colin successfully solved the first question while I was still trying to understand what it was asking
@CostaKazistov
@CostaKazistov Жыл бұрын
Watching Codeforces red smashing LeetCode mediums, going "is that it?" Just awesome!
@abrorabyyu6221
@abrorabyyu6221 Жыл бұрын
especially in first 5 minutes
@AnkitRaj-zm3me
@AnkitRaj-zm3me Жыл бұрын
Leetcode after seeing Grandmaster coders :- please leave me, don't destroy me😭😭
@codingmaster008
@codingmaster008 Жыл бұрын
my server is slow for red coders.....
@warrior_pk
@warrior_pk Жыл бұрын
Power of a competitive programmer 🔥
@arunm619
@arunm619 21 күн бұрын
Thanks Colin! I coded along with you and solved the 22 problems in 1 day. your coding is a black magic indeed!
@andrewchen2349
@andrewchen2349 Жыл бұрын
That's crazy... Thank you for this video!
@labidyramzi4840
@labidyramzi4840 Жыл бұрын
Keep the good work up man !! We want more videos on you solving problems on leetcode
@manishbolbanda4614
@manishbolbanda4614 Жыл бұрын
amazing video. Thanks for your efforts Colin.
@teja6522
@teja6522 Жыл бұрын
This is honestly making me cry , this dood is amazing
@Riley-ml9vo
@Riley-ml9vo Жыл бұрын
Nice video. Appreciate the work.
@ajikka5609
@ajikka5609 Жыл бұрын
Lol imagine solving an interviewers problem in 2mins, watching their mind explode and then spend rest of the time explaining it to the poor dude. You should do interviews just to mess with these arrogant fools who want us normies to solve 2 mediums in 30mins while interrupting every 30secs.
@UNMEASURED100
@UNMEASURED100 Жыл бұрын
That's the video I needed. Thanks
@sajaljaiswal1659
@sajaljaiswal1659 Жыл бұрын
Great content!
@IllIIIIIIllll
@IllIIIIIIllll Жыл бұрын
8:03 the realisation,every coders can relate this 😂
@TheUmangTarang
@TheUmangTarang Жыл бұрын
Really cool seeing you implement solutions so fast, this can be great guide on how to code elegantly. I generally can think of the solution but may not write a smooth code for it, seeing this can be helpful. It may be difficult to do but could you create a video on how to write elegant solutions? I know a lot of it can be just practice but if there are some ideas one should keep in mind when coding that can help learning to write good solutions faster can be great. Maybe taking a look at leetcode's least upvoted accepted submissions and compare them with most upvoted ones can give you some ideas. There are dudes which literally solve LC hard in like 15 lines of code whereas I write 50 lines lol
@Rajmanov
@Rajmanov Жыл бұрын
is just practice, a normal person would take 10 years to do it practicing 1 hour every day.
@PegasusTenma1
@PegasusTenma1 10 ай бұрын
Competitive programming is much harder than Leetcode, that’s why it’s so easy for him. That’s like me winning a Math Olympiad, going back to take a High school math exam only to go “is that it? It’s this easy?” And yes this has happened to me. As an example, I have never touched leetcode before, but that circle problem, I managed to deduce its logic faster than he was able to. Why? Because this problem is like a standard grade 10-11 Math problem here
@Avighna
@Avighna Ай бұрын
@@PegasusTenma1🛐🛐 wow, I’m still always so blown away by math Olympiad people
@ShivamKumar-kd5iv
@ShivamKumar-kd5iv Жыл бұрын
Pls make CF div2 post contest videos As most of the coders are div2 Thank you 🙌🏻
@LetsbeHonest97
@LetsbeHonest97 Жыл бұрын
The first question took me two days to solve
@YounisLY
@YounisLY Жыл бұрын
Ouch that hurts
@Rajmanov
@Rajmanov Жыл бұрын
for him took 3 days, but now we all are here.
@Hugo-gy8cm
@Hugo-gy8cm Жыл бұрын
What is the music in the intro
@Lamya1111
@Lamya1111 9 ай бұрын
....goals.
@Daman1628
@Daman1628 Жыл бұрын
the first solution itself blew my mind
@josephchaaban8840
@josephchaaban8840 Жыл бұрын
i still don’t get it, any explanation?
@akarshitbatra1754
@akarshitbatra1754 Жыл бұрын
@@josephchaaban8840 See , we have to represt the given number in the sum of decibinary numbers For 32 we need 10 11 11 coz here you see if we add the 10'th place digit like 1 + 1 + 1 it makes 3 and similary 1s digit place make 1 +0 +1 =2 so comes number 32 Similary now for Input: S = “82734” Output: 8 Explanation: S can be represented as sum minimum of 8 Deci-Binary numbers {11111, 11111, 10111, 10101, 10100, 10100, 10100, 10000}. Now to make that we need decibinary number equavalent to thi highest digit in the given input number So he is just getting the highest one by iterating to each and every one
@user-dh8oi2mk4f
@user-dh8oi2mk4f Жыл бұрын
@@josephchaaban8840 Decibinary numbers can only have a 0 or 1, so any number with a 4 in it will require at least 4 numbers to get that digit. Same thing with any other digit. So the number of digits would be at least as large as every digit, which means it has to be the max digit.
@swagatadas5121
@swagatadas5121 Жыл бұрын
🔥🔥🔥🔥🔥
@leetcoder1159
@leetcoder1159 Жыл бұрын
hi
@sergiopietri5370
@sergiopietri5370 Жыл бұрын
what the fuck holy shit 😱 this is amazing
@oliverheber599
@oliverheber599 Жыл бұрын
For the third question, find the cumulative sum of the binary tree's deepest leaves, doesn't his algorithm search only the left-most and only the right-most leaf? What if on the left side of the tree the final node had a right leaf and visa versa for the right side. It is a binary tree not a binary search tree so the positioning of the nodes can be in any order?
@kunaljain6932
@kunaljain6932 Жыл бұрын
no his algo will go to each node it just resets to 0 if he finds a node deeper that previous
@user-dh8oi2mk4f
@user-dh8oi2mk4f Жыл бұрын
No? It's recursive, dfs will call dfs on the left and right node. That will in turn call dfs on both left and right nodes of the child nodes, and so on.
@oliverheber599
@oliverheber599 Жыл бұрын
@@user-dh8oi2mk4f got it thanks. Funny how one month makes this now seem easy.
@lotnewlifewhy5190
@lotnewlifewhy5190 Жыл бұрын
@@oliverheber599 Great progress bro!
@oliverheber599
@oliverheber599 Жыл бұрын
@@lotnewlifewhy5190 Thanks friend. Still on the grind. Solved 150 easy, 50 medium and my first hard the other day 🤌
@therahul5304
@therahul5304 Жыл бұрын
Op
@tristanhdez2008
@tristanhdez2008 Жыл бұрын
Which platform is better? LeetCode or Hackerrank?
@andrewferguson6901
@andrewferguson6901 Жыл бұрын
lc has about 100x more name recognition
@UNMEASURED100
@UNMEASURED100 Жыл бұрын
LeetCode is for preparation of Coding Interviews and Hackerrank is for learning basics and level up from a nood/beginner
@zenboost.8
@zenboost.8 Жыл бұрын
Nothing can beat CPers🔥🔥🙏🏻
@jamesbutler80
@jamesbutler80 Жыл бұрын
😂
@titusandronikus1337
@titusandronikus1337 5 ай бұрын
Many questions either implied or explicitly asked for in-place, const memory solutions, but you just ignored that. It was kind of disappointing. The overall speed is still ridiculously impressive, though!
@davidchang5862
@davidchang5862 3 ай бұрын
Hmm. Does Leetcode really help u in getting a coding related job despite the hype ?
@akashverma5756
@akashverma5756 5 ай бұрын
Even genius can get confused in LinkedList problems without Pen and Paper.
@Ihavetoreturnsomevideotapes
@Ihavetoreturnsomevideotapes Жыл бұрын
Boyinthe band?
@aptitude5431
@aptitude5431 Жыл бұрын
Please please practice daily on leetcode 😂🤣😂
@haxortaxor8736
@haxortaxor8736 Жыл бұрын
Colin! You gotta do this man kzfaq.info/get/bejne/mLeGoMum0pnZgo0.html , the one chip challenge but with solve a hard instead 😂
@dumdahdum
@dumdahdum Жыл бұрын
bro what
@Rahul-lg1nw
@Rahul-lg1nw Жыл бұрын
23:07 i don't get what is the use of those curly bracket while calling dfs calls for left and right?? can anyone help me?
@RahulPatwari233
@RahulPatwari233 Жыл бұрын
That is used to create a local scope, and release local variables as we exit the scope. As you can see, he used variable - y - in both the braces. If not those curly brace he would have to use diff names - like y1 and y2. It's a lesser known feature, but quite useful one.
@jollyjoker6340
@jollyjoker6340 Жыл бұрын
IMO you overly complicated the skyline one (13:30). Everything can be boosted to min(highest in row, highest in column) and those are easy to calculate. const rotate = grid => grid.map((_,xidx) => grid.map(arr => arr[xidx])) const maxes = grid => grid.map(arr => Math.max(...arr)) const sum = arr => arr.reduce((a,b) => a + b) const maxIncreaseKeepingSkyline = grid => { const maxRows = maxes(grid) const maxCols = maxes(rotate(grid)) return sum(grid.map( (arr, x) => sum(arr.map( (n, y) => Math.min(maxRows[x], maxCols[y]) - n )) )) } (Yeah, I'm a programmer but not a competitive one as you can se from the code :) )
@shivanshchakrawarti5582
@shivanshchakrawarti5582 10 ай бұрын
Yeah thought the same but didn't get how did he rotate the matrix
@jollyjoker6340
@jollyjoker6340 10 ай бұрын
@@shivanshchakrawarti5582 The rot90 function is like moving x,y to y,x but x goes from the end instead of the beginning. That's so it's a real 90-degree turn. x,y -> y,x would be enough here,
@shivanshchakrawarti5582
@shivanshchakrawarti5582 10 ай бұрын
@@jollyjoker6340 got it
@ramufgikiyi7669
@ramufgikiyi7669 Жыл бұрын
Hi
@johnsoe3430
@johnsoe3430 15 күн бұрын
Why does bro look like cheezfish
@erickaraujo8619
@erickaraujo8619 Жыл бұрын
Aaahhh thooooo
Taking On Google's HARDEST Interview Questions
1:25:26
Colin Galen
Рет қаралды 15 М.
The LeetCode Fallacy
6:08
NeetCode
Рет қаралды 422 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 10 МЛН
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 30 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 88 МЛН
Ranking Every Data Structure & Algorithm
39:13
Colin Galen
Рет қаралды 63 М.
I Made a Neural Network with just Redstone!
17:23
mattbatwings
Рет қаралды 593 М.
How to visualize and how it helped Michael Phelps to Olympic Success
5:38
Heather Robinson | How to Make Money Online
Рет қаралды 39 М.
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,4 МЛН
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 526 М.
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
I Tried To Speedrun LeetCode
1:06:17
Colin Galen
Рет қаралды 54 М.
MY ULTIMATE LEETCODE TRICKS
8:12
PIRATE KING
Рет қаралды 220 М.
Python programmer vs C programmer (speedrun)
1:43
Virbox
Рет қаралды 461 М.
Exploring LeetCode's WORST Questions
1:14:00
Colin Galen
Рет қаралды 26 М.
#miniphone
0:16
Miniphone
Рет қаралды 3,2 МЛН
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 6 МЛН
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 2,3 МЛН
WWDC 2024 - June 10 | Apple
1:43:37
Apple
Рет қаралды 10 МЛН