8 patterns to solve 80% Leetcode problems

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025
  • НаукаНаука

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

  • @sahilandsarra
    @sahilandsarra  8 месяцев назад +35

    Try my free email crash course to crush technical interviews:
    Interview Master (now called InstaByte) - instabyte.io/

    • @TheViral_fyp
      @TheViral_fyp 8 месяцев назад +3

      Brother you doing great job 👍 ... But can u suggest me best book fundamental of DSA stuffs in java

    • @vivekcreation1904
      @vivekcreation1904 6 месяцев назад

      The link is not working....

  • @conqdat
    @conqdat 8 месяцев назад +602

    1. 2 pointer: 6:18
    2. Binary Tree BFS: 5:26
    3. Topological Sort: 4:33
    4. Binary Tree DFS: 3:39
    5. Top K Elements: 2:45
    6. Modified Binary Search: 1:35
    7. Subset: 1:04
    8. Sliding window: 0:17

  • @TeenyPort
    @TeenyPort 8 месяцев назад +282

    Wow this video just made me realize A.) how much I forgot since I graduated, and B.) how much I haven’t needed to remember any of this so far in my professional developer career

    • @makima7457
      @makima7457 7 месяцев назад +8

      so you mean these doesn't apply to your working experience. I am a student and I saw some competition problems like these and couldn't solve some. Then I thought that what will I do when I got a job?

    • @sidtalks2885
      @sidtalks2885 7 месяцев назад

      @@makima7457 Believe me , you won't need any of these

    • @hen56349
      @hen56349 7 месяцев назад

      @@makima7457 no, your job doesn't require this. However, it just improves your understanding of coding overall. If you are very good at leetcode, then employers can be confident in you. It shows employers that you have the discipline t to learn any skills required for a job.

    • @rafiashan8389
      @rafiashan8389 7 месяцев назад +23

      @@makima7457 These kind of problems improve our problem solving abilities. That's why we learn / practice these pattern. In professional career, there not many situations where you need to use these patterns as there are already templates given. We just need to know how to use them accordingly.

    • @Bladermishal10
      @Bladermishal10 6 месяцев назад

      ​@@rafiashan8389exactly but then when you wanna change job this is the kind of questions they ask in interviews, hence why I am here xD

  • @nadim379
    @nadim379 5 месяцев назад +6

    8. 0:16 Sliding Window Pattern
    7. 1:02 Subset Pattern
    6. 1:34 Modified Binary Search Pattern
    5. 2:45 Top k Elements Pattern
    4. 3:40 Binary Tree DFS Pattern
    3. 3:34 Topological Sort Pattern
    2. 5:25 Binary Tree BFS Pattern
    1. 6:18 Two Pointer Pattern

  • @austecon6818
    @austecon6818 4 месяца назад +40

    I am still under 200 problems solved but I think I'm already qualified enough to say that this video is exactly the advice I would give too. The 80/20 rule... that 8 patterns will help you solve about 70% of mediums with the caveat that you DEEPLY understand the patterns and all the possible subtle variations. The other 30% are either different algorithms, tricks / math knowledge, greedy algorithms or DP problems... but most DP problems can be solved well enough with DFS + top-down memoisation.

  • @Brajgamer
    @Brajgamer 7 месяцев назад +69

    Its one thing to master solving these problems. But its completely different story when it comes to identify these patterns in real world problems or modelling real issues with these data structures.

    • @svistetsky
      @svistetsky 6 месяцев назад +8

      Once you've solved enough of each pattern, you can reduce any given problem to the basis (some "ideal", simple problem).

  • @Shhhh-ni5jw
    @Shhhh-ni5jw 8 месяцев назад +23

    I practices a lot of leetcode but my brain feels frozen right now and I cannot write any code even if I know the approaxh

  • @the-real-dr2050
    @the-real-dr2050 8 месяцев назад +9

    Several great easy takeaways from this video and I’ve only watched it once. I’ll implement bisect left and right in swift now lol. Love it, thanks

  • @habibalnoman845
    @habibalnoman845 8 месяцев назад +28

    happy to see you, love from Bangladesh ❤

    • @Bladermishal10
      @Bladermishal10 6 месяцев назад

      Are you a software engineer in Bangladesh?

  • @BrownStain_Silver
    @BrownStain_Silver 8 месяцев назад +3

    I just discovered your channel after 4 months in a basic Python and intro to data science. During the course, I've written a few programs to automate tasks at work. I'm deciding where to go next and the most efficient way to get there. This channel is awesome! It has put so much into the right context to make the next decision.

  • @lakshmi8347
    @lakshmi8347 8 месяцев назад +60

    This video is mind-blowing !!!
    Sir, Why don't you start a series on each pattern???
    It would be useful for everyone even though it is paid 🙏

    • @avinashkumar3116
      @avinashkumar3116 6 месяцев назад +1

      Striver has already made series on each pattern with problems.
      Check it out on his channel #takeUforward, course name - Strivers A2Z DSA Course.
      He is the best.

  • @chandup832
    @chandup832 6 месяцев назад +2

    can you share list of problems in each pattern to practice? That would be very helpful, Thanks

  • @YashTrivedi-iq3ft
    @YashTrivedi-iq3ft 8 месяцев назад +74

    Bro speaks in Lowercase

    • @arvindgb7995
      @arvindgb7995 Месяц назад

      😂 dang I lol'd so hard. His chill is unbeatable yeah.

  • @TastieFoodHyderabad
    @TastieFoodHyderabad 2 месяца назад +2

    How do you create such animations?

  • @raghavbakshee9307
    @raghavbakshee9307 4 месяца назад +25

    Bro speaks in lowercase

  • @jonathanjohnson2785
    @jonathanjohnson2785 8 месяцев назад +2

    Too valuable. Thanks Sahil❤

  • @anamikakumari3879
    @anamikakumari3879 8 месяцев назад +21

    It would be great if you could share curated questions list for each pattern for practice

  • @navin_thomas
    @navin_thomas 6 месяцев назад

    Thanks for providing the advice regarding the bisect module functions.

  • @ranihirani
    @ranihirani 3 месяца назад +1

    I'm so gonna consume these patterns into my soul.

  • @thanhn2001
    @thanhn2001 5 месяцев назад

    Thank you such a great video that doesn't take 1 hour.

  • @J4RMAMS
    @J4RMAMS 7 месяцев назад +1

    I love you Sahil!!! Your journey inspired me to apply for a masters in computer science at Northeastern University!!!

  • @SaitejaE
    @SaitejaE 8 месяцев назад +4

    Thanks for useful content!!

  • @Marcusparker-vu4pr
    @Marcusparker-vu4pr Месяц назад

    Life changing video ❤

  • @md_pedia1
    @md_pedia1 8 месяцев назад +2

    That was really insightful ❤

  • @nikitarao9617
    @nikitarao9617 4 месяца назад

    Which is the best course to learn DSA and their time complexities?

  • @dasariasritha7974
    @dasariasritha7974 2 месяца назад

    Hi, I really admire your content which is unique and worth, could please make sure that after every new method maintain few seconds time so that we can process it. Actually your words have clarity only transition of topics need a little gap

  • @SridTech
    @SridTech 8 месяцев назад +2

    I subscribed to the interviewmaster mailing list. But no mail is delivered.

  • @MrTubeyoucomment
    @MrTubeyoucomment 8 месяцев назад +9

    As someone commented earlier - Bro talks in lowercase 🤣🤣🤣

  • @MADA_QWE
    @MADA_QWE 8 месяцев назад +1

    I am taking CS50, Introduction to Programming with Python. Sometimes, when I try to solve problems, I can't figure them out. I might understand the logic, but struggle with implementing it. After attempting to solve the problem myself, I often have to look at the solution. When I do, I understand it. Does this mean I'm a bad programmer, or that programming isn't for me?

    • @youtubeuserwhowatchesyoutube
      @youtubeuserwhowatchesyoutube 8 месяцев назад

      same bro same....i feel like iam working so hard for nothing🥲

    • @anihadagali4725
      @anihadagali4725 8 месяцев назад +2

      It's always Ok to look at the solutions. But Make sure you understand the solution. But do revisit the problem the try solving it again, this time maybe chose a different language (any lang works, it's good to know more languages).

  • @juq6971
    @juq6971 3 месяца назад

    this video is only useful for those that have already solved enough of those Leetcode problems

  • @srinivaschaligeri5760
    @srinivaschaligeri5760 8 месяцев назад +2

    I am always looking for your new videos ❤

  • @Lalalala22537
    @Lalalala22537 8 месяцев назад +1

    Are you a front-end / back-end developer or something else?

  • @vishwaroop1431
    @vishwaroop1431 3 месяца назад

    bro whats difference betn 2 pointer and a sliding window

  • @akshayar5993
    @akshayar5993 8 месяцев назад

    How to learn to solve subset and substring problems? Can you please guide

  • @i_youtube_
    @i_youtube_ 8 месяцев назад

    Which software do you use for animation?

  • @RahulChauhan-0907
    @RahulChauhan-0907 8 месяцев назад

    Sir, I am a data science enthusiast I have covered all the mathematics behind machine learning, practice the implementation and did same for deep learning also.
    I started NLP please guide me towards this role I want to get a good job this placement season it will start later this year kindly guide

  • @SenthilkumarDeivasigamani
    @SenthilkumarDeivasigamani 8 месяцев назад +1

    Thank you Sahil ❤

  • @NavdeepVarshney-ep4ck
    @NavdeepVarshney-ep4ck 6 месяцев назад

    Sor I want to know is currently there scope in the industry because there is massive layoff please help me I have to prepare.

  • @himanshumishra6243
    @himanshumishra6243 8 месяцев назад

    good video bro..could you please suggest me DSA course for golang

  • @Kaviarasu_S
    @Kaviarasu_S 8 месяцев назад

    can you please share tools used to create these content

  • @madhvishrivastava3646
    @madhvishrivastava3646 8 месяцев назад

    Hi Sahil...sometimes I feel difficulty in thinking logic...I think it will improve over time by solving many problems. I don't know if I am right ?

  • @ayushtiwari6473
    @ayushtiwari6473 8 месяцев назад

    Prefix array, hashing are add-on

  • @Allthingslearningg
    @Allthingslearningg Месяц назад

    I feel he should have mentioned the 2 pointer pattern at the top as the first pattern

  • @1234567qwerification
    @1234567qwerification 7 месяцев назад

    What about UnionFind?
    Is it in the topological sorting?

    • @arvindgb7995
      @arvindgb7995 Месяц назад

      what no that's totally different

  • @neerajsinghbisht4030
    @neerajsinghbisht4030 8 месяцев назад +4

    People from India 🎉

  • @syedsaad4160
    @syedsaad4160 8 месяцев назад +2

    Hashmap is pretty important too

  • @md.nahidulalamchowdhury9568
    @md.nahidulalamchowdhury9568 6 месяцев назад

    Thanks a lot.

  • @pioneerx9066
    @pioneerx9066 6 месяцев назад

    DP is no tmentioned?

  • @sabbirhossan3499
    @sabbirhossan3499 8 месяцев назад

    Sir I didn't understand leetcode problem what can do please help.

  • @jotrades26
    @jotrades26 7 месяцев назад +1

    Highly misleading, came to see patterns but saw generic DS& Algo script , patterns are there, what matters is the patterns that build from intuitions not concepts

  • @anilhanumantharao9144
    @anilhanumantharao9144 8 месяцев назад

    Thank you❣

  • @fahmidzaman
    @fahmidzaman 8 месяцев назад

    I want to be an AI engineer which topics should i learn durinh my BSC beside DSA

  • @abdullahalrafi101
    @abdullahalrafi101 8 месяцев назад

    Thank you.....🔥🔥🔥

  • @pawanterdal2261
    @pawanterdal2261 8 месяцев назад

    What about dynamic programming and graphs ?

  • @pvibe-re3rt
    @pvibe-re3rt 7 месяцев назад

    Greater explanation

  • @Mwme2000
    @Mwme2000 6 месяцев назад +2

    Can you please tell me if it is important to slove competitive programming questions ? Is it important to my career. I am good at coding and problem solving but don't slove hard questions

  • @dhirajvanarase4331
    @dhirajvanarase4331 8 месяцев назад

    Can you please make video on Salesforce developer path.

  • @BrainyQuizZone
    @BrainyQuizZone 8 месяцев назад

    I am bigger python can i join your course are not

  • @priyankashettigar4475
    @priyankashettigar4475 8 месяцев назад

    Can you please tell how to improve logical and critical thinking skill??

    • @NatureNourisher
      @NatureNourisher 8 месяцев назад

      Hai.you should solve sudoku and logical problems which are available free on internet

    • @hamza_dev
      @hamza_dev 8 месяцев назад

      By practicing.

  • @georgerussel
    @georgerussel 7 месяцев назад

    Where is DP?

  • @dhirajvanarase4331
    @dhirajvanarase4331 8 месяцев назад

    Please make a video on Salesforce Developer path

  • @045sunilkumar2
    @045sunilkumar2 8 месяцев назад +2

    Please tell us about how to start leetcode for beginners

  • @pawelsubko7277
    @pawelsubko7277 8 месяцев назад +11

    More like 40%, to solve another 50% to be at the desired 90% you need only 35 more patterns.

  • @aj-lan284
    @aj-lan284 8 месяцев назад

    you inspired me sahil. btw how did you get 300K package? is it your negotiation skills or due to COVID you got a high package? please tell me

  • @galanoth17
    @galanoth17 6 месяцев назад +1

    Suprised DP patterns is not on the list.

  • @SS-lg8fc
    @SS-lg8fc 8 месяцев назад

    Finally you've uploaded a video

  • @shanthim2573
    @shanthim2573 8 месяцев назад +1

    Good effort bro

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

    man ki baat.

  • @rahulkumar11a98
    @rahulkumar11a98 8 месяцев назад

    Should we do DSA in JavaScript

    • @nofeah89
      @nofeah89 8 месяцев назад +1

      Can do in any language JS is popular because its the backbone of web

  • @CodingWorldHere
    @CodingWorldHere 8 месяцев назад +3

    Hard to digest in 8 minutes make detailed video.

  • @jaihindjaiswar5880
    @jaihindjaiswar5880 6 месяцев назад

    i love your videos😍

  • @ReshmaShaik-zi9rz
    @ReshmaShaik-zi9rz 8 месяцев назад

    Bro can u make a video on doing a project on git hub for beginners plss

  • @gowthammyil
    @gowthammyil 8 месяцев назад

    Great knowledgeable video❤

    • @01_abhijeet49
      @01_abhijeet49 8 месяцев назад

      You have to implement it too

  • @lordadamson
    @lordadamson 7 месяцев назад

    thanks a lot

  • @qwerttest3550
    @qwerttest3550 8 месяцев назад

    Hi Sahil, can I know if your running any consultancy for outside India jobs of so can you provide me the details

  • @SDGful
    @SDGful 3 месяца назад

    please should learn DS and algo to build big stuff and give it to open-source problem with Indian developers learn DS just to crack interviews thats why there is no Indian big open source community which has build some extreme stuff like Database, streaming solution, or compilers or anything not even a framework

  • @funnycartoons707
    @funnycartoons707 8 месяцев назад +3

    Love from IIT Delhi jwala hostel

  • @mdyusufansari8897
    @mdyusufansari8897 8 месяцев назад +5

    please make complete courses on devops, cloud computing.

    • @Simple_OG
      @Simple_OG 8 месяцев назад +2

      Stop watching courses do something with yourself

    • @carl.bergmann
      @carl.bergmann 8 месяцев назад

      @@Simple_OG I disagree, doing something yourself if good for reaching "depth" like a path in a DFS. Doing a course/reading a book is like a BFS in a given domain. It gives you the overview and wires the concepts together. So, you need both.

  • @aadigupta3639
    @aadigupta3639 4 месяца назад

    catcha is nt working

  • @sachinreddy2836
    @sachinreddy2836 8 месяцев назад

    Nice video❤

  • @williejohnson3692
    @williejohnson3692 6 месяцев назад

    Subscribed but no email..

  • @esrx7a
    @esrx7a 8 месяцев назад

    Thank you Sahil anna

  • @samplewebinar5783
    @samplewebinar5783 6 месяцев назад

    But the patterns will have subpatterns

  • @technology_planet2024
    @technology_planet2024 8 месяцев назад

    The legend!

  • @BhoomikaD-r4l
    @BhoomikaD-r4l 4 месяца назад

    Me after listening to him: may be bro is very serious person in life
    Me after seeing thumbnail: may be not 🤔

  • @imPriyansh77
    @imPriyansh77 8 месяцев назад

    Thank you Sir

  • @omkarsawant1167
    @omkarsawant1167 7 месяцев назад

    bro is like sidhi baat no bakwas

  • @Artsbyaishwarya
    @Artsbyaishwarya 8 месяцев назад

    Good for revision

  • @vedparkashgaba5478
    @vedparkashgaba5478 8 месяцев назад

    Valuable video

  • @kishorpustake6682
    @kishorpustake6682 Месяц назад

    I can't think logic of an easy leetcode problems can't solve a single easy leetcode problem till now from 2 years I m learning 😖😖😖

  • @foundry1534
    @foundry1534 7 месяцев назад

    я удивлён тем, что много чего из этого списка есть в ЕГЭ

  • @unknown-rl1bd
    @unknown-rl1bd 5 месяцев назад

  • @rishiraj2548
    @rishiraj2548 8 месяцев назад

    Thanks

  • @Channel-j8w
    @Channel-j8w 8 месяцев назад +1

    6:18

  • @hlearningkids
    @hlearningkids 8 месяцев назад

    Very good

  • @zaidkhan-rx4bb
    @zaidkhan-rx4bb 8 месяцев назад

    Amazing

  • @MRsajib-ht4ff
    @MRsajib-ht4ff 8 месяцев назад

    your voice awesome

  • @ayushagarwal3864
    @ayushagarwal3864 7 месяцев назад

    All this is good until DP and Graphs come into play :P

  • @naveenkumart3399
    @naveenkumart3399 3 месяца назад +1

    People from India

  • @vanshraj4724
    @vanshraj4724 8 месяцев назад

    where's dynamic programming? 💀