Recurrence Relations:  Three Examples
7:11
Dynamic Programming:  Subset Sum
26:46
Merge Sort:  Top-Down and Bottom-Up
20:19
Quick Sort and Quick Select
21:36
4 жыл бұрын
Пікірлер
@aasdgsa
@aasdgsa 5 күн бұрын
At 4:46, after f - g , why does it go to f - k if the edge weight is 19, the highest out of all the others? Isn't it supposed to go in sorted order, meaning after f - g (weight 9) it goes to j - g (weight 10) which is discarded since g is already connected to j via other edges, then f - j (weight 11) which is also discarded, then g - h (12) which is added to the MST, then f - l weight (13)? Why was f - l (weight 13) not added instead of f - k (weight 19) in this case?
@AlgorithmswithAttitude
@AlgorithmswithAttitude 3 күн бұрын
f-k has weight 10. j-g has weight 19. The weight text is oriented with the edge.
@KingDTX
@KingDTX 6 күн бұрын
Should be mandatory watching for every DSA student. Such a great video!
@IrmaModzgvrishvili
@IrmaModzgvrishvili Ай бұрын
If you're looking to truly grasp the concept, this is probably the best video out there, and it does so in a very short amount of time.
@samarthtandale9121
@samarthtandale9121 Ай бұрын
Can't we reduce dominating set to vertex cover in a following way: Reduction: Given a problem to find a dominating set D in a graph G = (V, E), we find a vertex cover V and return it as dominating set because every vertex cover is a dominating set. This reduction shows that dominating set <=p vertex cover i.e. Dominating set is no-harder than vertex cover. Please tell me if this reduction is right or I'm going wrong somewhere ... ???
@AlgorithmswithAttitude
@AlgorithmswithAttitude Ай бұрын
It is true that every vertex cover is a dominating set...but a graph can have a dominating set that is smaller than the smallest door takes cover. So, if we ask the question "is there a dominating set of size 1" in a triangle, the answer is yes, any vertex will do. But the smallest vertex has size 2, and knowing that there is a size 2 vertex cover doesn't help us to know the size of the smallest dominating set. This example gets much worse when you scale it: a clique with n vertices has a dominating set of size 1, but its smallest vertex cover is size n -1.
@SplitSecondShot
@SplitSecondShot Ай бұрын
Just wanted to let you know, I'm having my algorithms mid term tomorrow and your videos are life savers. Thank you so much.
@ngocchaunguyen8685
@ngocchaunguyen8685 Ай бұрын
Also, you may not see/ answer this question, but I am curious on this matter: What is the difference between storing a null reference and a dummy value? Is that because it takes longer to process reference? If so, why is that the case? If not, is that because a dummy value is an integer and takes less memory (4 bytes) compared to reference (usually higher than 4 bytes)? Thank you ahead for your time, professor.
@AlgorithmswithAttitude
@AlgorithmswithAttitude Ай бұрын
I think it just makes for cleaner code. Suppose that you are trying to find a minimum path length, and the edge weight represents a distance, with most distances being relatively small numbers. If you plug in a dummy value like the maximum possible integer (which might be 2 billion, but I will call infinity), then you can say "if a < b" instead of "if (a !=null && b != null && a < b)".
@ngocchaunguyen8685
@ngocchaunguyen8685 Ай бұрын
8 years have passed, yet the content still stands with time. Thank you professor. Greetings from SoCal.
@brianheartwood2071
@brianheartwood2071 Ай бұрын
I lolled at the voice. thanks man this was informative and great.
@Texa8
@Texa8 2 ай бұрын
I have disliked multiple videos on these topics before coming to this one. The only one that makes so much sense... I just wish you covered more algorithms but I will be referring to your videos as a priority from here on out Thank you!
@brendawilliams8062
@brendawilliams8062 3 ай бұрын
How is equilibrium used in video games exactly
@brendawilliams8062
@brendawilliams8062 3 ай бұрын
Yt. Lol I’ve done death by search. 😅🙃
@ashishmore5549
@ashishmore5549 3 ай бұрын
Thank you Sir Great Explanation
@JikeWimblik
@JikeWimblik 3 ай бұрын
What about partial reductions to restricted 2sats to deduce restricted 3sats that make it easy to solve the main 3sat problem. To fiddly and approach for humans but not ai.
@davidnguyen9023
@davidnguyen9023 3 ай бұрын
Thank you, the explanation is great! The only thing I had to find more details on was why lg(n!) = Ω(n lg(n)).
@AlgorithmswithAttitude
@AlgorithmswithAttitude 3 ай бұрын
It seems reasonable to not have that analysis be part of this video, but maybe I should link to an explanation. But, because log (product) = sum (log), taking the top half of the factorial terms (each at least n/2), we can see lg n! Is at least (n/2) (lg (n/2)) = (n/2) ((lg n) - 1), where the lower bound is easier to see.
@davidnguyen9023
@davidnguyen9023 3 ай бұрын
@@AlgorithmswithAttitude I see :) In my opinion, if the explanation fits into 1-2 lines, why not include it in the slideshow, since the result may not be clear to everyone? On the other hand, one could also argue that since the proof isn't that hard, it could be left as an exercise.
@vini_jr_07_20
@vini_jr_07_20 3 ай бұрын
i have a doubt this is inductive method or substitution method??
@aakritipangeni8791
@aakritipangeni8791 3 ай бұрын
substitution method is also called inductive method
@vini_jr_07_20
@vini_jr_07_20 3 ай бұрын
@@aakritipangeni8791 but my university substitution method is called where we iterate the t(n-1) ,t(n-2)... And put these to get nth t(n) ...they call iterative method substitution here ....like they are substituting t(n-1) in t(n) then t(n-2) and so on
@aakritipangeni8791
@aakritipangeni8791 3 ай бұрын
@@vini_jr_07_20 yes that's called backward substitution method or iterative method too.
@vini_jr_07_20
@vini_jr_07_20 3 ай бұрын
@@aakritipangeni8791 where are you from and from which college?
@vini_jr_07_20
@vini_jr_07_20 3 ай бұрын
​@@aakritipangeni8791 From which method should i solve a recurrence if they just mention substitution
@JIHYELEE-h2m
@JIHYELEE-h2m 4 ай бұрын
Thank you for combining the quick sort and quick selection!
@janpoonthong
@janpoonthong 4 ай бұрын
I like the tree visualization, super helpful
@jay_wright_thats_right
@jay_wright_thats_right 6 ай бұрын
This was a bit boring to me but I won't give the video a thumbs down. I know people need to eat.
@AlgorithmswithAttitude
@AlgorithmswithAttitude 4 ай бұрын
Definitions are kind of boring, but without a shared vocabulary, it is hard to discuss the topic. Also, I haven't actually monetized these videos...and if I did, they might only buy me a burger per year anyway.
@kpg8848
@kpg8848 8 ай бұрын
Thank you for inspiring me!
@dinethradivanjana5022
@dinethradivanjana5022 8 ай бұрын
can't understand actually I tried so many time.
@AlgorithmswithAttitude
@AlgorithmswithAttitude 8 ай бұрын
Is there any specific questions that I could answer?
@AndrewNeumann-id3ph
@AndrewNeumann-id3ph 8 ай бұрын
Best video on Boruvka's! Thank you very much
@AndrewNeumann-id3ph
@AndrewNeumann-id3ph 8 ай бұрын
Best video on Boruvka's on YT! Thank you very much
@abshaigavvala9906
@abshaigavvala9906 8 ай бұрын
kinda meh
@masauhan
@masauhan 10 ай бұрын
i just fell jin love
@divinechijindu7465
@divinechijindu7465 10 ай бұрын
This dude definitely went to Queens
@pratikprakhar3109
@pratikprakhar3109 10 ай бұрын
By far one of the best video on DFS.
@MikeSieko17
@MikeSieko17 11 ай бұрын
why is it so hard to find videos on examples of people solving time complexity of while loops
@SpeaksYourWord
@SpeaksYourWord 11 ай бұрын
Trees are such a retarded concept. What possible use could this have?
@imganesh12
@imganesh12 11 ай бұрын
Easiest explanation❤
@extremeforlife8563
@extremeforlife8563 Жыл бұрын
Am I wrong in saying that the independent set is the graph compliment of clique, while the independent set is the vertex complement of vertex over?
@AlgorithmswithAttitude
@AlgorithmswithAttitude 11 ай бұрын
Basically, yes, though to make it precise, the wording is a bit tricky. If a set of vertices in a graph forms a clique, that set of vertices is an independent set in the complement graph. And, if a set of vertices is a vertex cover in a graph, the complement of those vertices is an independent set in the same graph.
@valentinlishkov9540
@valentinlishkov9540 Жыл бұрын
If interested, we will also develop 2D (sheet) optimization of cutting for inquiries and information: or the addresses specified in the channel
@konstantinrebrov675
@konstantinrebrov675 Жыл бұрын
Wow, it's a very unique insight for dynamic programming, that it's actually originally a recursive problem that can be represented as recursion tree. And then we optimize it.
@yunoletmehaveaname
@yunoletmehaveaname Жыл бұрын
Post more videos please!!!
@yunoletmehaveaname
@yunoletmehaveaname Жыл бұрын
If a problem is NP-Hard, does that make it automatically np-complete?
@AlgorithmswithAttitude
@AlgorithmswithAttitude Жыл бұрын
No, the problem could be so hard that it is not NP.
@jaimecastillo9711
@jaimecastillo9711 Жыл бұрын
A problem is NP-Complete if it is NP hard & has a non-deterministic polynomial time algorithm.
@yunoletmehaveaname
@yunoletmehaveaname Жыл бұрын
The clock had me 💀💀💀🤣
@Rockyzach88
@Rockyzach88 Жыл бұрын
Good
Жыл бұрын
Best quick sort video, however, it mentions the sedgewick's quick sort thesis that is written on a typewriter as "not wort it" :( whose page number is over 300!!!
@AlgorithmswithAttitude
@AlgorithmswithAttitude Жыл бұрын
Wait, did I say it wasn't worth it. I don't think I did. I didn't read it, so that doesn't seem like something I would say. But I do feel like you can get a pretty good understanding of quicksort in under 300 pages.
@mopedg8962
@mopedg8962 Жыл бұрын
Really great explained! Enjoyed "the voice from above"
@rehutai2978
@rehutai2978 Жыл бұрын
Absolute Legend.
@durlov5
@durlov5 Жыл бұрын
Finally understood QuickSelect! Thanks!
@modetechno7728
@modetechno7728 Жыл бұрын
It would be super helpful to explain why we use certain letters and symbols. I always get a bit lost
@ashishmore5549
@ashishmore5549 Жыл бұрын
This is really great
@dickomin
@dickomin Жыл бұрын
This is such a big improvement from your earlier videos. Thank you for your dedication and commitment to the craft!
@AlgorithmswithAttitude
@AlgorithmswithAttitude Жыл бұрын
It's the hair, right? I want to redo the whole playlist, but haven't made the time. Hopefully within the next few months...
@ek7735
@ek7735 2 ай бұрын
@@AlgorithmswithAttitude you are singlehandedly saving my average (tentative). thank you for all this.
@greenxdshadow6635
@greenxdshadow6635 Жыл бұрын
I appreciate the color coding in this video
@Supakills101
@Supakills101 Жыл бұрын
I finally understand now!
@brendawilliams8062
@brendawilliams8062 3 ай бұрын
It Still takes additional study. You have to physically work it out. Just to have an Excellent teacher. Yes. Thankyou
@ehah33
@ehah33 Жыл бұрын
Cheeky transition at 2:15 with no acknowledgement to the obvious! Edit: andddd we’re back lol 11:19
@porco-espinhoestudioso6616
@porco-espinhoestudioso6616 Жыл бұрын
Thanks for the amazing video!
@afraz-khan
@afraz-khan Жыл бұрын
this animation 10:02 has really cleared my confusions about topological sort, thank you
@AkshatShahjade-f3j
@AkshatShahjade-f3j Жыл бұрын
Such amazing content... Waiting for the next video in the playlist...
@akshatshahjade6344
@akshatshahjade6344 Жыл бұрын
I have a doubt... 06:04 Why does back-edge return ancestor before descendant? If we use the !(visited[nbr]){ //Do recursive DFS } condition during the DFS, the ancestor shouldn't be recursed. so the descendant should be returned first…. Where am I wrong???
@AlgorithmswithAttitude
@AlgorithmswithAttitude 11 ай бұрын
That section describes how, for everything EXCEPT back edges, for edge u->v, v finishes first. Because DFS in a Directed ACYCLIC Graph will have no back edges, we don't need to worry about the fact that for back edge u->v, u would return first.