Top Competitive Programmer vs. LeetCode's HARDEST Questions

Поділитися
Вставка
  • Опубліковано 22 тра 2024
  • A top competitive programmer from the Codeforces/CodeChef realm (with almost zero prior interview experience) takes on the hardest questions known to LeetCode to find out... how good is competitive programming, really? Is it enough to dominate even the hardest questions that LeetCode 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)
    Questions
    Q1 (14.2%): leetcode.com/problems/strong-...
    Q2 (15.0%): leetcode.com/problems/booking...
    Q3 (15.7%): leetcode.com/problems/fancy-s...
    Support me with money: www.buymeacoffee.com/galencolin
    Music:
    Sthlm Sunset by Ehrling
    • Ehrling - Sthlm Sunset
    (not exactly sure how to credit, the given link is dead)
    Paradise by Ikson ( / ikson )
    Link: • Ikson - Paradise
    This Is For You (Prod. by Lukrembo)
    Link: • lukrembo - this is for...
    Timestamps:
    0:00:00 Intro
    0:01:17 Format
    0:02:15 Q1 (hardest, 14.2%)
    0:23:01 Q1 - Recap
    0:24:06 Q2 (2nd hardest, 15.0%)
    0:53:46 Q2 - Recap
    0:56:01 Q3 (3rd hardest, 15.7%)
    1:04:05 Q3 - Recap
    1:04:37 Conclusion
  • Наука та технологія

КОМЕНТАРІ • 196

  • @spaceclones3115
    @spaceclones3115 Рік тому +10

    this is the most useful series Colin, please more of leetcode hards

  • @jeremyvonhatten5811
    @jeremyvonhatten5811 Рік тому +132

    Good content for sure.
    Would love to hear more commentary about how you break the problem down.

  • @ScienceSeekho
    @ScienceSeekho Рік тому +56

    This dude has replaced the word "HARD" with "FUN".
    That's the secret to MAANG

    • @syntaxandRender
      @syntaxandRender Рік тому +8

      MANGA

    • @nyannyan4928
      @nyannyan4928 Рік тому

      @@syntaxandRender i clicked video, on first two secs i got baited, scammed thinking of someone else [gender specific];

  • @Arcvx
    @Arcvx Рік тому +9

    Colin really stepped up the editing with this video. Kudos.

  • @cuddledog142
    @cuddledog142 Рік тому +159

    Dude, I literally just started learning how to prgram, but I love watching these videos haha. Just watching the thought process is interesting

    • @pawnzvalorant2692
      @pawnzvalorant2692 Рік тому +1

      same here :)

    • @hiccupmcgee1590
      @hiccupmcgee1590 Рік тому

      It’s the start of any program, just plan out the problem and do it step by step, including the syntax’s. It’s fairly simple the hard part is coming up with the actual program lol.

    • @peterbelanger4094
      @peterbelanger4094 Рік тому +2

      I first learned basic on a TRS-80 in 1981. Been in front of computers ever since. Now I have severe carpal, and my eyes are getting old. These questions are indeed challenging, but not impossible. But I have no idea how he does them so fast. But his hands still work and he can see the screen reliably.

    • @reverend481
      @reverend481 Рік тому

      Yall wanna create a study/ practice group?

    • @pawnzvalorant2692
      @pawnzvalorant2692 Рік тому

      @@reverend481 why not:)

  • @nalinraj4347
    @nalinraj4347 Рік тому +280

    Video idea !! : do 100 leetcode easy questions under 30 minutes i guarantee you it will blow up .....or something similar with medium level questions

    • @ColinGalen
      @ColinGalen  Рік тому +127

      You read my mind, that's literally my next video idea (though 100 in 30 mins is overestimating my skill)

    • @hieishaka321
      @hieishaka321 Рік тому +23

      @@ColinGalen it would be hard to even fully understand 100 questions in 30 minutes

    • @MrTacoMan123
      @MrTacoMan123 Рік тому +45

      You realize that's only 18 seconds per question right? lol

    • @adaelasm6467
      @adaelasm6467 Рік тому +16

      I don't think I could even read that many question in 30 minutes

    • @sarveshwarmahapatro9568
      @sarveshwarmahapatro9568 Рік тому +13

      60 in 60min would be a nice idea

  • @uptonogood300
    @uptonogood300 Рік тому +9

    just found out this channel ,i'm so glad i did

  • @toraso842
    @toraso842 Рік тому +57

    I'm just starting to get into this field and this looks insane

    • @TheCameltotem
      @TheCameltotem Рік тому +1

      Leetcoding or software development? Because they are not even remotely linked.

    • @pignoob9551
      @pignoob9551 Рік тому

      @@TheCameltotem really

    • @shmeepurt
      @shmeepurt Рік тому

      @@TheCameltotem what’s the point of leet code? Is it to test yourself?

    • @ron0studios
      @ron0studios Рік тому +4

      @@shmeepurt it's for coding interview preparation. Big tech companies make you do questions like these to see whether they should hire you. Some people also like to do it for fun or, yeah, to test themselves/practice (competitive programming)

    • @antonbellis2397
      @antonbellis2397 Рік тому

      ​@@TheCameltotem Programming isnt really more than working with basic mathematical computations and "strings" (aka char sequences). Activly practicing these is a good entry for learning new languages and even intermediates can practice these basic but essenial skills

  • @dcp303
    @dcp303 Рік тому +40

    You are built different lol. Can’t wait to see where your career takes you! I’m sure you will be involved in some cool impactful engineering somewhere down the road!
    Question for you, have you hit diminishing returns growth-wise with algos? Not knocking the fun aspect of it or anything but SWE has so many domains outside of DS&A that are worth diving deep into as well.
    How’s your sys design? OOP? TDD? Can you work across the stack?
    Wishing you the best bro! Keep learning and growing!

    • @krellin
      @krellin Рік тому +8

      competitive programming is not necessarily getting you anywhere, its more of a hobby for those who want to do it.
      Hard work on real problems and dedication will though...

    • @studentse166
      @studentse166 Рік тому +1

      yeah I can't tell if this is a joke competitive programming is more like a video game

    • @Vastaway
      @Vastaway 6 місяців тому

      @@krellin won't it help for coding interviews tho?

    • @krellin
      @krellin 6 місяців тому

      ​@@Vastaway no, only very very niche interviews, like if you want to do google interview, and you have to solve it on blackboard then what he does is useful... but if you are prepping for google interview and you are good engineer already you will take a month off to prepare for their unique annoying method...
      If you are young, like in school totally get into it... but if you are already working somewhere as a junior this is sub optimal.

    • @Vastaway
      @Vastaway 6 місяців тому

      @@krellin oh ok, thanks for the tip! yea im in school and wondering if I should continue.

  • @Selbstzensur
    @Selbstzensur Рік тому

    thanks for sharing your though process!

  • @michaelcasana8376
    @michaelcasana8376 Рік тому

    Awesome! I saw the thumbnail and title and clicked immediately. Great video

  • @sata1938
    @sata1938 Рік тому

    Love your vids dude

  • @yamiplays428
    @yamiplays428 Рік тому +10

    I get so annoyed when I am unable to come up with a logic.. Sometimes the logic sounds so absurd that I question myself if I know code💀

  • @xBounce3x
    @xBounce3x Рік тому +1

    You're actually insane bro!

  • @jellyfish1772
    @jellyfish1772 Рік тому

    Love this man

  • @nguyendatz
    @nguyendatz Рік тому +3

    I think content competitive programmer vs leetcode contest is very cool, u can try it

  • @bukshotaz
    @bukshotaz Рік тому +1

    love the videos.. new at programing it all looks like black magic... I would love more explanation on why you do what you do.. LOL

  • @Excalibur19
    @Excalibur19 Рік тому

    Dude, dude you are awesome

  • @MonteLogic
    @MonteLogic Рік тому +1

    Hello, I like the effort. Good vid but I would think it would be good idea to reduce the size of that clock as it can get annoying.

  • @sunburststratocaster
    @sunburststratocaster Рік тому

    Great content

  • @nelsonwang4582
    @nelsonwang4582 Рік тому +2

    Nice content 😍😍

  • @kevinstefanov2841
    @kevinstefanov2841 Рік тому +15

    LeetCode's hardest problems are a piece of cake compared to what's on CodeForces. These problems are considered AT MOST average difficulty on there. That's what I used to prepare for coding interviews, and it worked. I nailed pretty much all of them.

    • @JulioSantos-bv5ro
      @JulioSantos-bv5ro Рік тому +1

      U make me feel so dumb 😂😂

    • @JulioSantos-bv5ro
      @JulioSantos-bv5ro Рік тому

      @@kevinstefanov2841 i would love to...can I have u discord ?

    • @kevinstefanov2841
      @kevinstefanov2841 Рік тому

      @@JulioSantos-bv5ro pls tell me yours cuz i changed mine and ever since i did people have been having trouble sending me friend requests

    • @franklinnwankwo9442
      @franklinnwankwo9442 Рік тому

      @@kevinstefanov2841 Here's mine if you don't mind helping @crypToch

    • @kevinstefanov2841
      @kevinstefanov2841 Рік тому

      @@franklinnwankwo9442 what are the 4 digits after the # ?

  • @likeXaXprodigy
    @likeXaXprodigy Рік тому +35

    Super impressed how quickly you came up with the "black magic" solution for the n >= 20 case in Q1- had to stop and think for a while to understand.
    For others wondering: note that in the 6

    • @illegalsmirf
      @illegalsmirf Рік тому +7

      What?

    • @ona2
      @ona2 Рік тому +13

      @Jon Smith what did he say wrong here lol. The comment was quite helpful

    • @illegalsmirf
      @illegalsmirf Рік тому

      @@ona2 no

    • @kocahmet1
      @kocahmet1 Рік тому +5

      @Jon Smith how do you figure he has narrow horizons

    • @bur2000
      @bur2000 Рік тому +8

      @Jon Smith you assume your definition of fun applies to everybody? Maybe you should broaden your horizon, eh? I could tell you, "bruh, read a book learn something in your one life lol"

  • @cyber_dbs
    @cyber_dbs Рік тому +5

    me (while looking at the first problem) : huh! this is so easy, lemme pause this video and code..
    me (Later) : *Struggling for 3-4 hours only to find that the algorithm sucks for several testcases*

  • @NeilHighley
    @NeilHighley Рік тому

    Loved the sub 1 second google check *chefs kiss*

  • @DBZM1k3
    @DBZM1k3 Рік тому +6

    I wish I were this big brain. I failed my Google interview a couple of months ago and I'm not young anymore either. I wish I could do this but honestly I don't see it happening, it's hard to learn this stuff.

    • @Renoistic
      @Renoistic Рік тому +6

      I've never been good at Google-style interviews or timed algorithm-focused tests, but have successfully worked in the field for 6+ years. And I was +30 when I entered it. There are many companies that are interested in results, not in how clever your algorithms are. If you focus your efforts in a popular field like web development or ML you can find work all across the world. No need to aim for Google unless you have a specific reason for it.

  • @raunaktamang8309
    @raunaktamang8309 Рік тому

    great content

  • @lostmeme9862
    @lostmeme9862 Рік тому +1

    Can you make a 3 month boot camp going from 0 to competitive programmer.

  • @theophilemaniragaba3518
    @theophilemaniragaba3518 Рік тому

    you are the best dude

  • @olayinkaanifowose5099
    @olayinkaanifowose5099 Рік тому +13

    do a competitive programmer vs project Euler problems

  • @anikevin
    @anikevin Рік тому +9

    Then there's me struggling with almost all medium questions. At least I don't suck at lc easies anymore.

    • @RAGEEcs
      @RAGEEcs Рік тому

      do you feel like whats helping you get through leetcode is good knowledge on data structures?

    • @anikevin
      @anikevin Рік тому +5

      @@RAGEEcs of course basic understanding of data structures is needed. But what's helping is lots of practice. There are tons of videos from guys like Neetcode, Kevin Naughton and Nick White that have solved LC questions. I check their videos if I feel stuck and try to comprehend their approach.

    • @kevinstefanov2841
      @kevinstefanov2841 Рік тому

      @@anikevin LeetCode's hardest problems are not difficult at all compared to CodeForces' most difficult problems. Go there if you really want competitive programming ;)

  • @user-vn5mo8mc6o
    @user-vn5mo8mc6o 2 місяці тому

    Informative

  • @NeilHighley
    @NeilHighley Рік тому +1

    You should create your own ultra question.

  • @leedloading3553
    @leedloading3553 Рік тому +5

    I would appreciate it if you explain your code after finishing it. I get that you don't want to make it a long video but just an idea.

  • @codingid5470
    @codingid5470 Рік тому +1

    Video idea : Solving leetcode's 30 day monthly problems in 'X' hours!

  • @TheKeule33
    @TheKeule33 Рік тому +1

    That deep voice surprised me.

  • @terencehill3972
    @terencehill3972 Рік тому

    How did I end up here?? I have nothing to do with programming. But this was…intriguing! MORE. I want to see you taking on Russian hackers

  • @noaaa8335
    @noaaa8335 Рік тому +4

    when you code using your text editor, what is the command you use in the terminal to run the c++ you write?

    • @joon_yoo
      @joon_yoo Рік тому +3

      you need to compile your code probably using g++ to create an executable, then you run it :)

  • @francolasd.b.9159
    @francolasd.b.9159 Рік тому

    The world's most employable man

  • @juma21347
    @juma21347 Рік тому

    Can you move characters in the string or switch them? does that count as a step?
    I'm trying to solve the problem myself, but for some reason I'm counting 9 on "bbaaaaaaaaaaaaaaacccccc", and the answer is 8. I just cant see how you can make that case in 8.

    • @dimigaminghd4523
      @dimigaminghd4523 Рік тому

      change 'a' 4 times, remove the last 'a', change 'c' once, remove 'c' twice.

    • @travissauder7883
      @travissauder7883 Рік тому

      You probably were removing all from the largest group of consecutive same characters instead of removing from the group of consecutive same characters that has the lowest n % 3 value where n is the number of consecutive same characters in a row. Removing 3 "a"s only reduces the number of rule breaks by 1 where as removing an "a" and a "c" reduces rule breaks by 2. You could actually remove any character after those 2 and still reach 8 changes using 5 switches.

  • @akshaytata
    @akshaytata Рік тому

    love that jazz

  • @vplays4842
    @vplays4842 Рік тому

    how did u start writing code when u are begening?

  • @businessgoose8605
    @businessgoose8605 Рік тому

    You did great! now do it in bash -_-

  • @stoneshou
    @stoneshou Рік тому

    Can you try calculator IV?

  • @retishe7660
    @retishe7660 2 місяці тому

    u should start streaming content like this pls

  • @mindsoulvalley1900
    @mindsoulvalley1900 Рік тому

    At start he is like "this is annoying... this might suck".. after finishing "ok it's fair"... brooo🤣🤣

  • @ankushshah5422
    @ankushshah5422 Рік тому

    I was shocked to hear your voice.🤣

  • @georgejetson9801
    @georgejetson9801 Рік тому

    1.20am and here I am.

  • @denisc.1282
    @denisc.1282 Рік тому

    After watching that u start appreciate schools like Harvard

  • @nelsonthekinger
    @nelsonthekinger 4 місяці тому

    This is an adhoc problem right?

  • @anshul9856
    @anshul9856 Рік тому

    Bro get your spectacle power checked, blinking a lot can be a sign of an increase in the power

  • @jaserogers997
    @jaserogers997 5 місяців тому +1

    Have you ever gone outside?

  • @divyanshsahu9736
    @divyanshsahu9736 Рік тому

    🔥🔥🔥

  • @adenosinetp10
    @adenosinetp10 Рік тому +1

    I clicked on this video, thinking you were a coder girl. My eyes have deceived me.

  • @digupathania25
    @digupathania25 Рік тому

    i was shocked at 0:001sec .....Can anyone guess why?
    Btw i watched him first time!

  • @AtH1338
    @AtH1338 Рік тому +1

    how do you get into competitive programming?

  • @jeevan1874
    @jeevan1874 Рік тому +1

    How do i code like him... Is there any right path to follow to code like him?

    • @broomybroomybroomy
      @broomybroomybroomy Рік тому

      It probably helps to understand CS concepts instead of just learning code syntax. Also math like discrete math and number theory

    • @MrTheHegemon
      @MrTheHegemon Рік тому

      Please don't code like him if you're trying to get a job.

  • @vidishchandekar4316
    @vidishchandekar4316 Рік тому +1

    BTD6 is

  • @skyarubi
    @skyarubi Рік тому

    His coding ability is indeed remarkable, but I don't get why nobody talked about how beautiful his hair is.

  • @DadModeActivated
    @DadModeActivated Рік тому

    Question: 420
    You: Yes, 420

  • @fu2201
    @fu2201 Рік тому

    The Ring

  • @moogleking
    @moogleking Рік тому

    I can't do programming this fast takes me longer lol

  • @jasoncole1833
    @jasoncole1833 Рік тому +1

    Shout out all the people here who have absolutely 0 coding/programming experience

    • @jv1192
      @jv1192 Рік тому

      After watching this are you still considering being a software engineer? This looks too hard for me. I’m having second thoughts

    • @jasoncole1833
      @jasoncole1833 Рік тому

      @@jv1192 I never was

    • @jv1192
      @jv1192 Рік тому

      @@jasoncole1833 what is your career? Just curious I’m still undecided

    • @jasoncole1833
      @jasoncole1833 Рік тому

      @@jv1192 in college

    • @StereoMyth1
      @StereoMyth1 Рік тому

      @@jv1192 usually nobody starts to code because they love coding haha. you want to create something and coding is just means to an end. if you're passionate about creating whatever it is , software website or games. most of the people that code professionally will tell you that they cant script from the top of their head like this guy , but you do develop that "6th sense" of the logic needed to fix a problem. at least you will know what you're missing or what to search for. good luck!
      In terms leetcode solving capabilities , he far accedes any developer I personally know of

  • @christyseow5519
    @christyseow5519 Рік тому +3

    Anyways, hair care tutorials thank you? XD

    • @ColinGalen
      @ColinGalen  Рік тому +4

      I do like nothing and it stays (mostly) great, I'm just blessed

  • @alok1819
    @alok1819 Рік тому

    ❤️❤️❤️❤️

  • @Hubert4515
    @Hubert4515 Рік тому

    you did a lot of cuts there

  • @techdreams6748
    @techdreams6748 Рік тому

    Hey no what😭😂
    You know what i mean if you accidentally click this video

  • @blasterzm
    @blasterzm Рік тому +1

    One big issue: the code you write won't pass during a coding interview because of not being clean quality code

    • @sitansusekhar1739
      @sitansusekhar1739 4 місяці тому

      Is he sitting in an interview in the first place??

  • @mannini007
    @mannini007 Рік тому

    i also play bloons tower defense

  • @dante19890
    @dante19890 Рік тому

    he actually looks a bit like my ex

  • @xgaming4216
    @xgaming4216 Рік тому

    Why you have long hairs?

  • @rifqimujahid4907
    @rifqimujahid4907 Рік тому

    Whoa moistcritical lil bro is here

  • @BODYBUILDERS_AGAINST_FEMINISM

    Algorithm comment!

  • @zoasis7805
    @zoasis7805 Рік тому +2

    Your camera keeps jump cutting conveniently when you are not talking, but the timestamp increases at a continuous rate. Not trying to dismiss this but I would like you to respond to this.

  • @kutay8421
    @kutay8421 Рік тому

    she is beautiful . . .

  • @vivago727
    @vivago727 Рік тому +1

    Do Project Euler's lowest solved questions

  • @raptyaxa5771
    @raptyaxa5771 Рік тому

    *confoosedPikachuFace

  • @jacksondavid706
    @jacksondavid706 Рік тому

    What its easy af

  • @davr9724
    @davr9724 Рік тому

    Need to update your browser lol

  • @melajod4wan135
    @melajod4wan135 8 місяців тому

    Why tf do you look like fang yuan ?

  • @redfordkobayashi6936
    @redfordkobayashi6936 Рік тому

    how old are you?

  • @suraj-ej6oq
    @suraj-ej6oq Рік тому

    Please solve problems using java also...

  • @ahmadkhatib3117
    @ahmadkhatib3117 Рік тому

    Holy fucking shit, what the fuck is going on in question 3 😢

  • @michaelmraz2707
    @michaelmraz2707 Рік тому

    Voice does not match face

  • @nirajandata
    @nirajandata Рік тому

    1st comment

  • @sunnyrawat931
    @sunnyrawat931 Рік тому

    i thougth you're a girl first ..lol

  • @Ripred0219
    @Ripred0219 Рік тому +3

    Tbh u hella cute

  • @nathangwyn6098
    @nathangwyn6098 Рік тому

    That question isn't that hard? 🤔

  • @RodoMendoza
    @RodoMendoza Рік тому +2

    Leetcode hard questions are a piece of cake for you jajaja. Most of people (like me) are leetcode virgins jdjdjdd
    You are an inspiration 🙌🏼

  • @vivarantx
    @vivarantx Рік тому +3

    this chinese is a freaking genius, I really admire him, I could never achieve this level even if I tried

  • @illegalsmirf
    @illegalsmirf Рік тому

    Are you a girl or a boy?

    • @RM-xr8lq
      @RM-xr8lq Рік тому

      does it matter? lmao young people on youtube....

    • @blitzedoblivion4280
      @blitzedoblivion4280 Рік тому

      You can clearly see his Adams Apple...

  • @marcotroster8247
    @marcotroster8247 Рік тому +2

    I think you're very talented, but you really need to learn how to name things properly and approach problems with the divide + conquer strategy. I'm 10 years into programming, but didn't understand a thing because your code isn't very descriptive. Just watched it until the end because I was very fascinated with your geekyness 😂😂😂

    • @Lovinyou0
      @Lovinyou0 Рік тому +2

      Thats what competitive programmer does tho, im already surprised he used so many white space within his code. Its nothing like your day to day job programming

    • @marcotroster8247
      @marcotroster8247 Рік тому +1

      @@Lovinyou0 Haha ok 😂 But LeetCode is supposed to qualify for a job interview. And understandable code is prob very important for employers because that's their asset 🤔😂
      So what's this CP experiment going to prove? With CP you're smart enough to solve but won't get hired anyways because your code sucks? 😂😂😂

    • @matthewscudder7628
      @matthewscudder7628 Рік тому +3

      @@marcotroster8247 Spot on man, but that wasn't really the point here. The idea was to solve the problems fast, not to do a mock interview.

    • @marcotroster8247
      @marcotroster8247 Рік тому +1

      @@matthewscudder7628 Haha OK, there's no purpose other than fun? I like guys who program for fun 😂
      But my focus of programming fun is writing beautifully looking, well-architected code that performs well. I like what I'm doing, so I don't mind time so much because it's my passion 😂

    • @Renoistic
      @Renoistic Рік тому +1

      @@marcotroster8247 This is exactly why LeetCode and Codility are TERRIBLE tools. They are great if you want code wizards you lock in a room to come up with algorithms. These tests cannot measure how well a programmer work in a team or how quickly they adapt to existing code bases, unfamiliar tools and so on.

  • @johnhendrixson8133
    @johnhendrixson8133 Рік тому

    you should join a boxing gym. an hour a day. you'd have a hell of a jab with those long lanky arms. this ain't an insult.

  • @MD-vc7oh
    @MD-vc7oh Рік тому

    Are you a girl or a boy

  • @moonlightfilms5279
    @moonlightfilms5279 Рік тому

    Here’s an idea for a video, make a clone of leetcode, call it yeetcode, and make it test algorithms based off meme quality questions and put Elon Musk in the title for clickbait🚀

  • @jane_de_yar
    @jane_de_yar Рік тому +2

    Man female?????

  • @thetrungdang8102
    @thetrungdang8102 Рік тому +2

    i wonder what your social life looks like.. like its ok to be one of the best programmer at the field, but if you lack of social communication you cant really survive "outside"

    • @harisusman6096
      @harisusman6096 Рік тому +7

      Don’t hate…

    • @kevintorres91
      @kevintorres91 Рік тому +20

      i smell jealousy and envy

    • @xianzai_ad1928
      @xianzai_ad1928 Рік тому +7

      He literally has a channel 💀 it’s not like he is doing this shii in the dark you need some social skills to do that

    • @siddhantsharma5300
      @siddhantsharma5300 Рік тому +1

      He's perhaps one of the best. People come to him for becoming friends or asking for guidance, not the other way around.

    • @despicableone4495
      @despicableone4495 Рік тому +1

      Hes a good looking guy masculine features like sharp eyes and a strong chin I doubt he has any trouble

  • @satchel4242
    @satchel4242 Рік тому

    It's unethical to call yourself top anything.