Video není dostupné.
Omlouváme se.

Interval List Intersections | Leetcode

Sdílet
Vložit
  • čas přidán 22. 05. 2020
  • This video explains a very important interval based programming interview question which is to find all the intersecting intervals between two list of intervals. This is one of the most asked interview question. This may seem tricky at first glance but it is very simple once you draw some examples and apply your logic. I have shown 4 cases and one special case for this problem. using these cases and examples for each case, i have formulated the method to find the intersecting interval. I have shown dry run for an example and have finally explained the CODE at the end of the video. CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
    LinkedIn: / surya-pratap-kahar-47b...
    CODE LINK: gist.github.com/SuryaPratapK/...
    OTHER PROBLEMS:-
    Bitwise AND of numbers range : • Bitwise AND of numbers...
    Range minimum query: • Range minimum query | ...

Komentáře • 107

  • @genctasbasi
    @genctasbasi Před 3 lety +39

    I relax when I see the subject I didn't understand is covered by Tech Dose - it means I'm max 10 mins away getting it. Thanks.

  • @Cloud-577
    @Cloud-577 Před 2 lety +4

    I can't express enough how your explanations have helped us alot! you never jumped into the code instead you walk us through your thought process and guide us to the solution and that is exactly what we need. Thanks to you I can solve similar patterns without having to look up how to solve the problem.

  • @rakshith3547
    @rakshith3547 Před 3 lety +8

    man.. where were you all these days..i would request you to do more and more videos like these which would help thousands of job seekers and trust me you would be seriously blessed !

  • @TheDonMan97
    @TheDonMan97 Před rokem +2

    Man, Indians know how to explain shit! Thank you so much brother

  • @czerox16
    @czerox16 Před 2 lety

    you have the best channel for leetcode. you deserve the best.

  • @noibiolamilekan3501
    @noibiolamilekan3501 Před rokem

    Wow. a total breakdown! Indians are amazing!

  • @proghead00
    @proghead00 Před 2 lety

    Brilliant explanation. Intuitive yet confusing when you try for the first time :p

  • @ds_world2468
    @ds_world2468 Před 4 lety +2

    Such an amazing explanation!!! Only you have the ability to explain a complex problem in a very simple way.

  • @bitqahdi6592
    @bitqahdi6592 Před 3 lety +3

    Your channel is unique because you make us understand the intuition behind the problem and logic.c

  • @MP-ny3ep
    @MP-ny3ep Před 2 lety +1

    very very good explanation

  • @davepassaro8366
    @davepassaro8366 Před rokem

    excellent work, thank you, sir.

  • @vamsikrishna-uy9qp
    @vamsikrishna-uy9qp Před 4 lety +2

    Great explanation. 🙌🙌

  • @mehular0ra
    @mehular0ra Před 4 lety +3

    I find this playlist really useful. The problems are explained really well!

  • @ABHINAVKUMAR-vh3ln
    @ABHINAVKUMAR-vh3ln Před 2 lety +3

    Krishna bless you and your channel. You teaching is amazing. 😊😊

  • @irrompible4588
    @irrompible4588 Před 2 lety

    great explanation..

  • @YasseinBilal
    @YasseinBilal Před 2 lety +2

    Super talented in simplifying concepts. Thank you!

  • @michaelshen6690
    @michaelshen6690 Před 2 lety +2

    Thanks!

  • @lampyclampy
    @lampyclampy Před 4 lety +2

    Very nice explanation sir .
    Thanku so much .
    Keep making these videos .

  • @abhijeetkumar2204
    @abhijeetkumar2204 Před 4 lety

    awesome explanation

  • @artsysoul1050
    @artsysoul1050 Před 2 lety

    very nice explanation Thankyou !!

  • @srikrishna6595
    @srikrishna6595 Před 2 lety +1

    you expained it fing awesome bro

  • @meeravali3264
    @meeravali3264 Před 4 lety +2

    I’m regular follower of your channel
    What amazes is the examples you take to explain the concept and which covers all the scenarios . How do you get those examples 😀😀 Kudos to you 👏👏

    • @techdose4u
      @techdose4u  Před 4 lety

      I just make that up on my own. I might miss some cases though 😅

  • @boli7171
    @boli7171 Před 2 lety +1

    Excellent

  • @yitingg7942
    @yitingg7942 Před 3 lety +1

    Another amazing explanation!!!

  • @aakashyadav6228
    @aakashyadav6228 Před 4 lety +1

    Very nice explanation. Loving it !

  • @agileprogramming7463
    @agileprogramming7463 Před 4 lety +2

    Such a crisp explanation!!

  • @countdooku681
    @countdooku681 Před 2 lety +1

    Very detailed and superb explanation! Thank you!

  • @shaswatdas6553
    @shaswatdas6553 Před 3 lety +1

    def intersect(a1, a2, b1, b2):
    '''
    a1-----1----a2
    b1---2---b2
    interval 2 should start before interval 1 ends
    and interval 2 should end only after interval 1 starts
    '''
    return b1

  • @pavankumar.m1341
    @pavankumar.m1341 Před 3 lety +1

    Really well explained, i'm almost there but lost the word disjoint and was comparing 4 cases individually instead of simple approach like this

  • @sophiejhones3575
    @sophiejhones3575 Před 4 lety +1

    Excellent explanation, way better than the one provided on LeetCode.

  • @ShubhamMahawar_Dancer_Actor

    Again well explained

  • @sandeepkumawat4982
    @sandeepkumawat4982 Před 4 lety +1

    Thanks you made it so so easy...Thanks a million

  • @paragroy5359
    @paragroy5359 Před 4 lety +1

    Thanks for the explanation...

  • @coderaky
    @coderaky Před 4 lety +1

    Really great explanation.☕

  • @muhammedjack8303
    @muhammedjack8303 Před 4 lety +1

    Great explanation

  • @meghabisht3144
    @meghabisht3144 Před 4 lety +1

    Really helpful!

  • @amansarma417
    @amansarma417 Před 4 lety +1

    Your channel should grow it is providing amazing content

    • @techdose4u
      @techdose4u  Před 4 lety

      Yea it will. As soon as students find this channel 😅

    • @amansarma417
      @amansarma417 Před 4 lety

      @@techdose4u do a collaboration video what do you think? It may boost yout channel :)

  • @user-dp9gi1vg8r
    @user-dp9gi1vg8r Před rokem

    very good, ty a lot

  • @thiyagarajanr225
    @thiyagarajanr225 Před 4 lety +1

    You deserves honour !

  • @trevorPhillips284
    @trevorPhillips284 Před 2 lety

    i misunderstood the meaning of disjoint lmao, Thanks .

  • @vasachisenjubean5944
    @vasachisenjubean5944 Před 4 lety +1

    dada kamon acho ? darun video banao tumi ! 😋

  • @Majitsu
    @Majitsu Před 2 lety +1

    how do you know to increment by the second value?

  • @mkvikram4755
    @mkvikram4755 Před 4 lety +1

    thanks_.....

  • @prabhatchanchal
    @prabhatchanchal Před 4 lety +1

    Very nice explanation.
    But upload solutions after the day of question appear..

    • @techdose4u
      @techdose4u  Před 4 lety +3

      I understand the ethics. But for this challenge, solutions are available everywhere even on leetcode. This is just meant for fun. So, I do it everyday on the given day otherwise I will slack off.

  • @HarshGupta-if2xg
    @HarshGupta-if2xg Před 4 lety +2

    how is to improve problem solving skills and prepare for product based companies. please tell

    • @techdose4u
      @techdose4u  Před 4 lety

      Keep practicing mock tests of leetcode.

  • @erjang.4086
    @erjang.4086 Před 4 lety +2

    damn, i made a simple mistake in while - i put or vs and - it gave me out of bounds bug

  • @aniruddhachattopadhyay611

    Hi great video. Could you tell me the software you use to make this? You told me once you use Wacom tablet but what is this software/black notepad on which you write?

    • @techdose4u
      @techdose4u  Před 4 lety +1

      Wacom pro software as well. Combo from same company.

    • @aniruddhachattopadhyay611
      @aniruddhachattopadhyay611 Před 4 lety

      @@techdose4u thanks for the reply. Keep up the awesome work you are doing.

  • @antoniomartinez3429
    @antoniomartinez3429 Před 4 lety

    Is this sweep line?

  • @retrogame3138
    @retrogame3138 Před 4 lety +1

    Bro mene coding do hafto s bnd kr di h pta nhi mn nhi lg rha kai baache kh rhe company nhi ane wali is baar college m college ka bhi kuch pdh nhi rha aur gta 5 online khelte rhta hu man m lgta h pdhna h par kitab uthane s darta hu aur revision krne s

    • @techdose4u
      @techdose4u  Před 4 lety

      Bro if you do this then you will regret when you come out of college. There will be more competition off-campus due to COVID. Now if you don't keep practicing and improving your skills, you will not rise above avg coder and you won't bag any job. That will be way more frustrating. So, think about the worst case scenario and use it as a motivation to prepare.

  • @rajeshbammidy180
    @rajeshbammidy180 Před 4 lety +1

    Java soln:github.com/RajeshAatrayan/InterviewPreparation/blob/master/src/Arrays/IntervalListIntersections.java

  • @erjang.4086
    @erjang.4086 Před 4 lety +1

    i watch explanation but do code myself..

  • @HimanshuSingh-ob9qo
    @HimanshuSingh-ob9qo Před 4 lety +1

    Leet code 56 plz solve this Ques and explain it

    • @techdose4u
      @techdose4u  Před 4 lety +1

      That is a little tricky problem. I just did it now 😅 You need to check for both end and start. Sort using start and maintain max(end). I don't think you understood here. I will do this problem video later 😅

  • @dmsohel1335
    @dmsohel1335 Před 4 lety +1

    How to solve like this I am unable to solve this question please give any Tips to improve my problem solving skills

    • @techdose4u
      @techdose4u  Před 4 lety +1

      Just keep practicing and learning. There is no shortcut to it. When you can't solve. Just read editorial and code and understand why the logic works. Keep repeating this and you will see yourself solving questions on your own.

  • @035asadali8
    @035asadali8 Před 2 lety +1

    I think the same but not able to implement correctly 😢

  • @royalegamer4689
    @royalegamer4689 Před 4 lety +1

    Java code for this please

    • @techdose4u
      @techdose4u  Před 4 lety

      Couldn't code in java. Please get it from leetcode discussions.

  • @kshitijpancholi5594
    @kshitijpancholi5594 Před 3 lety

    Thanks!