How to Solve ANY LeetCode Problem (Step-by-Step)

Поделиться
HTML-код
  • Опубликовано: 14 июн 2024
  • You can solve ANY coding interview problem - you just need a step-by-step approach.
    In this video, I'll show you a formula for solving coding problems, and I'll also walk you through these steps for a hard LeetCode question, so you know you can solve anything with it!
    📘 Chapters
    0:00 - Intro
    0:48 - Simplify Problem
    3:02 - Pattern Recognition
    7:27 - Implementation Plan
    9:27 - Coding Time
    10:06 - Debug
    🔗 Resources
    AlgoMonster Flowchart: algo.monster/flowchart
    Big O EXPLAINED: • Big O in 2 Minutes
    Data Structures EXPLAINED: • Top 7 Data Structures ...
    Algorithms EXPLAINED: • Top 7 Algorithms for C...
    #coding #softwareengineer #leetcode
  • НаукаНаука

Комментарии • 87

  • @Codebagel
    @Codebagel  23 дня назад +11

    Link to the free flowchart I used in this video:
    algo.monster/flowchart

  • @alex0917lfo
    @alex0917lfo 19 дней назад +218

    At the first day of Leetcode , to be honest I felt I should give up. But 1 questions per day , 1 years later , I can pass 70% of easy and 40% medium. I even get an offer by passing 3 Leetcode questions with big bank company. So my suggestion is keep practicing Leetcode like you playing a game!!

    • @vrajpatel9259
      @vrajpatel9259 19 дней назад +9

      hey, i want to ask you wether you did all of the questions on leetcode by you own without any help or you tried and when you were not able to solve it than you referred to any yt video? i am doing leetcode so i am not able to solve the questions ... i try to solve one question for 1 hr or more and than i refer to yt video. is this good ? any suggestions? Thanks

    • @alex0917lfo
      @alex0917lfo 19 дней назад

      @@vrajpatel9259 Sure. Since you and my past self have no idea how to play the Leetcode game. Once you have no idea how to do it or don't understand the question within 10 mins , just look for the answer. There is no shame to look at it. The way I still doing it is look at the approach , and use that approach to create your own code.

    • @user-py4et2qk3c
      @user-py4et2qk3c 18 дней назад

      ​​@@vrajpatel9259hey we are on the same page. But you know that's the way of getting learn from mistakes. Keep it on mind where we struck, why does it happens every time? Try 30-40 mins max for any level of question even though can't trick the solution then try to approach other's intuition and code, then try a dry run on your own.. That's where I found my solution. Keep it up buddy... Have a nice day

    • @dynamiteSoul2324
      @dynamiteSoul2324 14 дней назад +6

      Same question as above

    • @bavnitsingh23
      @bavnitsingh23 9 дней назад +3

      Yes buddy , think solution for max an hour
      If it's not clicking than you can see solution
      But after that don't forget to revisit the question after some intervals

  • @anirudh6635
    @anirudh6635 23 дня назад +48

    If problem solving is your hobby then leetcode is a great place to be at.

  • @CommDao
    @CommDao 24 дня назад +64

    The feeling after starting to learn sort methods: everything is sort!

  • @redfinance3403
    @redfinance3403 15 дней назад +10

    That flowchart is genius!

  • @Sulerhy
    @Sulerhy 14 дней назад +10

    I stoped video at :"My friends cracked FAANG with less than 100 solved LC problems"

  • @RohaanKhalid-pz9iu
    @RohaanKhalid-pz9iu 24 дня назад +14

    One of the best videos I have watched! Especially going through a problem using the flowchart.

    • @Codebagel
      @Codebagel  24 дня назад +2

      Thanks so much! Walking through problems with a flowchart is a really systematic way to approach problems, and something I think engineering-minded people really benefit from.

  • @valentinrafael9201
    @valentinrafael9201 2 дня назад +1

    Perfect practice makes perfect indeed.

  • @abhinavprabhakar455
    @abhinavprabhakar455 17 дней назад +2

    Awesome! This video was very helpful. ❤

  • @bbmeireles
    @bbmeireles 10 дней назад +1

    Nice tips. Very thanks.

  • @electrode8773
    @electrode8773 18 дней назад +2

    Keep it up brother...I was one of those subscribers when you had started this channel..Its inspiring to see you grow..❤❤

    • @Codebagel
      @Codebagel  17 дней назад +1

      Thank you so much! I appreciate that you’ve been here since the start, hopefully I can keep making content that you can enjoy!

  • @incognitohacks4850
    @incognitohacks4850 24 дня назад +6

    Finally getting serious about coding and this is really eye opening. Started revising and learning about algorithms to get a strong foundation. Thanks for the video

    • @Codebagel
      @Codebagel  23 дня назад +2

      Great idea! Algorithms make up so much of coding, it’s super important to know the fundamentals.

  • @Amuseraa
    @Amuseraa 24 дня назад +4

    Thank you so much this really helps 😊

  • @0986rashmi
    @0986rashmi 10 дней назад +1

    Am a big fan of algo monster easy to follow those templates

  • @Joseph-uz2ry
    @Joseph-uz2ry 24 дня назад +2

    God bless you. This is so clutch

  • @aninditabatra3810
    @aninditabatra3810 24 дня назад +1

    love this video!

  • @homerlol9058
    @homerlol9058 24 дня назад +2

    That flowchart seems extremely useful

    • @Codebagel
      @Codebagel  24 дня назад +1

      The flow chart is amazing 👌

  • @akshaychavan5511
    @akshaychavan5511 21 день назад +2

    Everytime I wonder, why is this channel so underrated? 🤔

    • @Codebagel
      @Codebagel  21 день назад

      Haha thank you! Hopefully it won’t be for long 🫣

  • @tuntumwakalasya5270
    @tuntumwakalasya5270 22 дня назад

    Is this question like bus routes the hard question ? Great video

  • @taradean.
    @taradean. 23 дня назад

    thanks!

  • @aniver987
    @aniver987 День назад

    U think you can make another video of what to learn before leetcoding

  • @shivamsiddharthasinghrajaw7671
    @shivamsiddharthasinghrajaw7671 9 дней назад +2

    these things come naturally when you've practiced enough

  • @harshdiwan9283
    @harshdiwan9283 22 дня назад +3

    Hi , I have done the topics except dynamic programming and solve around 180 problems but still not able to build logic. Should i leave dsa ? Can you suggest me what should i do ?

    • @Codebagel
      @Codebagel  22 дня назад

      Hi! What areas do you find you struggle with the most? Is it recognizing the pattern? Is it knowing what to code?

    • @harshdiwan9283
      @harshdiwan9283 21 день назад

      @@Codebagel both. Sometimes know the approach but not able to convert it into code.

    • @user-xu2pp4fe1u
      @user-xu2pp4fe1u 20 дней назад

      I'm facing the same problem

    • @neetaspirant901
      @neetaspirant901 16 дней назад

      Solve recursion problems

  • @haniissa1990
    @haniissa1990 16 дней назад

    I want to be sure , in 1:57 you try to change begin-word to the word in the word-List until to reach the end-word

  • @yohahnribeiro6029
    @yohahnribeiro6029 17 дней назад

    Random observation, but in the slide that shows the final BFS solution, I think the code that checks if the new word is in the word list and not in the visited and not the word itself, needs to be indented to sit under the inner for loop?

    • @Codebagel
      @Codebagel  17 дней назад

      Good catch… 😅 after hours and hours of editing you’d think I’d catch everything but sometimes something slips through. Thanks for catching that!

    • @yohahnribeiro6029
      @yohahnribeiro6029 17 дней назад

      Hahah I'm sorry, didn't mean to devalue the effort at all. This video was incredible and thank you very much for making it 🎉❤

    • @Codebagel
      @Codebagel  17 дней назад +1

      @@yohahnribeiro6029 Haha no worries not at all! I actually like it when people point things out because I know to keep an eye on that for future videos! Only way to grow is to learn from mistakes, so thank you 😁

  • @Mubashir7933
    @Mubashir7933 6 дней назад

    Maybe I'm dumb but what if I didn't understand question, what should I do?

  • @haniissa1990
    @haniissa1990 16 дней назад

    from 2:32 , from dog ->lot I had to change two letters ? not one at the same time.

  • @doitwithghausiya2870
    @doitwithghausiya2870 7 дней назад

    this is by far the nicest video I have ever watched.

  • @nintendopro0391
    @nintendopro0391 23 дня назад +27

    I hate how interviews force Leetcode questions. Super annoying. I couldn’t get through the first problem.

    • @dss963
      @dss963 21 день назад +16

      The more you are good at solving these problems, the more you are able to come up with solutions for real-world probelms.The probelms test your ability to understand the requirements and write corresponding code for the same. So that's only way to test logical and analytical capabilities of a programmer.

    • @hello_world849
      @hello_world849 11 дней назад

      @@dss963 btw leetcode is not real world problem solving after solving few question I realized that

    • @dss963
      @dss963 10 дней назад

      @@hello_world849 you may come to use your intellectual and logical thinking where you might need to optimise the code for large data volumes. In such scenarios what you learned in algorithmic part come into play. And data structures btw is the core for a software developer or programmer.

    • @the-snailinator
      @the-snailinator 8 дней назад +2

      ​@@dss963 I remember all the times I used DP to model roles and users with active record... Hmm that can't be right. Maybe that was when I added some endpoints to a rest api.. Nope... Hey maybe it was inside a Temporal workflow I made? Or adding payment handling by integrating with Stripe? Nah.

  • @powerHungryMOSFET
    @powerHungryMOSFET 15 дней назад +2

    Leetcode is used for cracking interviews. It has nothing to do with talent. Even a cab driver can do it if he puts some time and effort’s

  • @hossain9410
    @hossain9410 15 дней назад

    is it neccessary to have any achievements in coding competitions to land a job???

    • @adyan4010
      @adyan4010 11 дней назад

      Not mandatory but will be a plus point in your resume

  • @moveonvillain1080
    @moveonvillain1080 24 дня назад +2

    4:52 me crying in my $13/day full time frontend developer job

  • @AdithyaRaj-dc9lv
    @AdithyaRaj-dc9lv 16 дней назад

    Can ai solve these qns?

  • @s8x.
    @s8x. 17 дней назад +1

    wait i need this flowchart

    • @Codebagel
      @Codebagel  16 дней назад

      Check the pinned comment - it’s completely free!

  • @ItWasEnder
    @ItWasEnder 10 дней назад +1

    Filthy Frank reference, the goat

  • @Richa_cute
    @Richa_cute 8 дней назад

    So far I have only completed less than 20 problems. Will get back to this comment when I’ve reached a century. 😊
    I know one doesn’t need to solve that many but I’ll taking a safety net so that I can also practice same kinda problems.

  • @brockormond4131
    @brockormond4131 24 дня назад

    13:10 So something that's been bugging me... is the things and the baby chocobos' butts their egg shell? But most look like plants, so are chocobos... plants? Flying/Grass type pokemon?

  • @1234victorxD
    @1234victorxD 15 дней назад

    Dude im doing an interview in a week and you might made me land a job... You know what? if you did I will pay back to you and the community. See you in a week!

    • @jeffreydijkstra3391
      @jeffreydijkstra3391 5 дней назад

      dude, what happend? :D

    • @1234victorxD
      @1234victorxD 5 дней назад

      @@jeffreydijkstra3391 They postphoned my interview and its going to happen tomorrow! wish me luck!

    • @1234victorxD
      @1234victorxD 2 дня назад

      @@jeffreydijkstra3391 Sup! I just received the answer that they are not going to hire me... even tho I have solved every code challenge in optmal solution and with no bugs. I Also did a nice System Design Interview... I think I might have been declined because of the Behaviour questions...

  • @Salah-YT
    @Salah-YT 16 дней назад +2

    Easy title, but why such a hard question, bro? You don't seem to care about beginners like me. You choose great content, but why explain such difficult problems? I couldn't even understand what you were talking about. Anyway, thanks.

    • @Codebagel
      @Codebagel  16 дней назад +4

      Hi Salah, I’m sorry that it seemed too difficult! I intentionally wanted to choose a question that most people would consider “hard” to show you that if you follow these steps, you can solve any question, even if it’s very difficult. May I ask which parts you couldn’t understand? Maybe I can provide clarity and make my future videos better.

  • @AlienAndrew51
    @AlienAndrew51 6 дней назад

    Worked at several fortune 500s without learning advanced leetcode, can only solve the easy problems which is what is mostly required at most companies.

  • @paragggoyal1552
    @paragggoyal1552 7 дней назад

    just solve more problems

  • @mfgd-qo2yo
    @mfgd-qo2yo 8 дней назад

    бибиксонаф .

  • @s2_ultimatetech655
    @s2_ultimatetech655 21 день назад +1

    Ae bhaiya ji job lag gyi hai????

    • @Codebagel
      @Codebagel  21 день назад +2

      Hanji mere paas job hain (hopefully that makes sense, still learning the language)

  • @Mubashir7933
    @Mubashir7933 6 дней назад

    you didn't show the solution of dog problem and lot was not possible and you straight jump into your own solution

  • @Alfakatt
    @Alfakatt 7 дней назад

    I’ve made a pretty good living never solving a leetcode in my life or even ever logged into the site

  • @domf21
    @domf21 24 дня назад +2

    Is def the N word

  • @vectoralphaAI
    @vectoralphaAI 19 дней назад +1

    Im not doing this shit.

  • @KushLemon
    @KushLemon 24 дня назад +1

    Useless video.

  • @go4amitshah
    @go4amitshah 24 дня назад +1

    This is soooooooo good. Thank you so much for the video 🤌

    • @Codebagel
      @Codebagel  24 дня назад

      I’m glad it helped!