Interval List Intersections | Leetcode
HTML-код
- Опубликовано: 12 сен 2024
- 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.co...
OTHER PROBLEMS:-
Bitwise AND of numbers range : • Bitwise AND of numbers...
Range minimum query: • Range minimum query | ...
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.
Nice confidence ❤️
very true
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.
Great ❤️
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 !
Thanks :) I will.
Such an amazing explanation!!! Only you have the ability to explain a complex problem in a very simple way.
Thanks :)
Your channel is unique because you make us understand the intuition behind the problem and logic.c
Thanks :)
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
👍
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 👏👏
I just make that up on my own. I might miss some cases though 😅
I find this playlist really useful. The problems are explained really well!
Thanks :)
Man, Indians know how to explain shit! Thank you so much brother
😂
Super talented in simplifying concepts. Thank you!
Welcome 😊
Krishna bless you and your channel. You teaching is amazing. 😊😊
Thanks 😊
you have the best channel for leetcode. you deserve the best.
Very nice explanation sir .
Thanku so much .
Keep making these videos .
Thanks :)
Brilliant explanation. Intuitive yet confusing when you try for the first time :p
Great explanation. 🙌🙌
Thanks :)
Wow. a total breakdown! Indians are amazing!
Really well explained, i'm almost there but lost the word disjoint and was comparing 4 cases individually instead of simple approach like this
Thanks
Java soln:github.com/RajeshAatrayan/InterviewPreparation/blob/master/src/Arrays/IntervalListIntersections.java
👍
Excellent explanation, way better than the one provided on LeetCode.
Thanks :)
you expained it fing awesome bro
Welcome :)
Thanks!
very very good explanation
Thanks 😊
thanks you for doing the needful sir
Such a crisp explanation!!
Thanks buddy :)
how do you know to increment by the second value?
Very detailed and superb explanation! Thank you!
Welcome 😊
Very nice explanation. Loving it !
Nice :)
Excellent
Thanks 😊
Your channel should grow it is providing amazing content
Yea it will. As soon as students find this channel 😅
@@techdose4u do a collaboration video what do you think? It may boost yout channel :)
Thanks you made it so so easy...Thanks a million
Welcome :)
Another amazing explanation!!!
Thanks :)
excellent work, thank you, sir.
Thanks for the explanation...
Welcome :)
Again well explained
Thanks :)
very nice explanation Thankyou !!
Great explanation
😁
Really great explanation.☕
Thanks :)
dada kamon acho ? darun video banao tumi ! 😋
Dhonnobaad :)
Is this sweep line?
how is to improve problem solving skills and prepare for product based companies. please tell
Keep practicing mock tests of leetcode.
very good, ty a lot
Welcome!
great explanation..
You deserves honour !
Thanks :)
Very nice explanation.
But upload solutions after the day of question appear..
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.
thanks_.....
Welcome :)
i misunderstood the meaning of disjoint lmao, Thanks .
Really helpful!
Thanks :)
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?
Wacom pro software as well. Combo from same company.
@@techdose4u thanks for the reply. Keep up the awesome work you are doing.
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
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.
How to solve like this I am unable to solve this question please give any Tips to improve my problem solving skills
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.
damn, i made a simple mistake in while - i put or vs and - it gave me out of bounds bug
:) I hope you did it now.
I think the same but not able to implement correctly 😢
Try solving merge intervals :)
Leet code 56 plz solve this Ques and explain it
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 😅
Java code for this please
Couldn't code in java. Please get it from leetcode discussions.
i watch explanation but do code myself..
Nice....good strategy.
awesome explanation
Thanks!