I heard that Dijkstra's algorithm does not always work well when the edges have negative weights. I considered if it would be possible to correct that by adding the absolute value of the most negative weight to every edge. It turns out that does not yield the correct answer unless you subtract that number * number of edges from the result for each path. This is probably common knowledge but seems fascinating to me.
@BackToBackSWE5 жыл бұрын
@@inversemetric Yeah, I messed up in saying that, I went back to verify and dijkstra's only operates on graphs with positive edge weights, I made that comment on the spot with no diligence.
@Ruby-mr1gn4 жыл бұрын
Dijkstra and Prim are used for dealing with different types of graphs and solving different kinds of problems: Dijkstra: Directed weighted(only allow non-negative weights) graph, find shortest lowest cost path from starting vertex to destination vertex; Prim: Undirected weighted graph, find lowest cost path to connect all vertices in this graph. Hope this helps ;)
@BackToBackSWE4 жыл бұрын
yes
@priyamvashi21873 жыл бұрын
we can also apply Dijkstra to Undirected weighted
@ElfHimSelf5 жыл бұрын
Got an offer from Lyft for the 2020 Software Engineering internship. Your videos helped me while studying 🙌
@imabeastyaok5 жыл бұрын
Toss me some money bro...those lyft salaries are crazyyy 😂🙏
@BackToBackSWE5 жыл бұрын
Where's my 10k at? jkjk, yeah, my friend just did Lyft. 💩's wild. Happy things went well.
@Naradmaxwell4 жыл бұрын
man, how did you make it?? please tell, it will really help me in getting an internship.
@aj-tg4 жыл бұрын
gg
@arrahul3164 жыл бұрын
The effort that you put at a very granular level is something truly commendable. This is the first time I understood both of these Alg and probably one of the the best 9 am to 10.30 am on a Sunday
@BackToBackSWE4 жыл бұрын
great
@DJalyssagail4 жыл бұрын
i get excited when i search for an algorithms topic in youtube and your video appears. great explanation and teaching technique as always!
@BackToBackSWE4 жыл бұрын
thx
@davidbellamy13884 жыл бұрын
I'm new here and don't know when you started, but you are underrated.
@BackToBackSWE4 жыл бұрын
hahahahahaha, welcome to the 💩 show, please be seated
@cphash4 жыл бұрын
I specifically search for your videos whenever I want to understand the concepts. Thanks a lot for the content!
@BackToBackSWE4 жыл бұрын
nice!
@sams70683 жыл бұрын
Great video, these are simple concepts but the way you tracked each node's parent in Dijkstra's Algorithm was a lifesaver. I was getting so bogged down in just maintaining my busy tree with arrows, etc. Saves a lot of confusion!
@BackToBackSWE3 жыл бұрын
Glad you liked it
@thezanycosmophile4 жыл бұрын
Appreciate what you’re doing so much! You have the right attitude for video, and your sincere efforts are visible to make us understand better. Thanks again.
@BackToBackSWE4 жыл бұрын
ye
@rishabkumar49404 жыл бұрын
My friend was asked this question in an interview, he was very confused as the two algorithms do totally different jobs so how can they be compared. But now I understand that they are very similar. Thanks!
@BackToBackSWE4 жыл бұрын
sure
@dab-city5 жыл бұрын
this video just saved my gpa for real thank you thank you sir
@BackToBackSWE5 жыл бұрын
Sure.
@qbertrtrtg5 жыл бұрын
Just found your channel. I never liked learning about algorithms, time complexities... because it was too confusing and very dry (talking about that CLRS book.....) But the way you present content makes it very easy and interesting to learn about these topics now!
@BackToBackSWE5 жыл бұрын
Nice! glad to hear
@galbalandroid3 жыл бұрын
For the MST, why didn't we favor A->B->G? that would yield a cheaper overall tree than going through A->F->D->G?
@Dark1DICE11 ай бұрын
Very precise and clearly presented! Thanks!
@thecs490prof24 жыл бұрын
Dude I love your lectures! I use them constantly to help prepare my own lectures for my Advanced Algorithms class :)
@BackToBackSWE4 жыл бұрын
nice - hey
@thecs490prof24 жыл бұрын
@@BackToBackSWE Btw if you're interested, I'd also be interested in a collab! I have a lot of students in my class, and I'd be happy if you wanted to do a guest lecture or make a small guest appearance :D It might be beneficial to you as well because some of my students might end up investing in your platform as well! Hit me up if you're interested - sr66+collab@njit.edu
@jayjin5 жыл бұрын
Could you please make a video to explain Leetcode #4: Median of two sorted arrays. Thank you in advance!
@BackToBackSWE5 жыл бұрын
yeah
@adriandeveraaa5 жыл бұрын
I have yet to take an algos course. Transition from EE to CS. What is a "greedy" algorithm? And what video should I begin in your series D:?
@BackToBackSWE5 жыл бұрын
brilliant.org/wiki/greedy-algorithm/ and not sure?
@neon_342 Жыл бұрын
Hello @backTobackswe. I love your lectures. After 6 months of doing research, I came to a solution that I need to purchase your course only. And I did it also. Can you please bring a series of lectures of DSA concepts. Not only solving questions. But what is what and how to create from scratch and its internal working in Java
@BackToBackSWE Жыл бұрын
Hi, thank you for your suggestions. Yes absolutely. We already have some videos explaining core DSA Concepts, you can find them here and on our platform - backtobackswe.com/ 😄
@neon_342 Жыл бұрын
@BaclToBackSWE are you going to add more questions on your platform ? Or remove some questions and in place of that adding new ones ? Are you going to add some OS, Networking, DBMS questions also in your package ? And how frequent you update your course content on your platform ?
@eashanmathur5604 жыл бұрын
In Prim's algorithm, why aren't nodes E and G connected? When you get to E, your only choice is to go to G so why wasn't that choice made?
@BackToBackSWE4 жыл бұрын
I don't remember this video and dont have time to rewatch cuz replying fast
@eashanmathur20304 жыл бұрын
16:55
@annatvsf4 жыл бұрын
@@BackToBackSWE I also was wondering why we ignored EG edge and same situation with CF edge later. Is vertex supposed to have more than one edge to choose the min from?
@MiketheCoder5 жыл бұрын
Now the bigger question is in what scenario would you use one over the other?
@BackToBackSWE5 жыл бұрын
wym
@join2nitin4 жыл бұрын
Can you please provide C# code implementation for problem "Find Shortest Path in undirected weighted graph from source vertex to each vertex", I have purchased your course but could not find code on your website.
@BackToBackSWE4 жыл бұрын
Hey! We would love to, but right now we are rewriting everything from scratch and don't have too many resources to redirect (it is just 2 devs, us, right now). The new experience will be out in the middle of 2021.
@SunnyGuptaTech4 жыл бұрын
Which microphone do you use to record your videos, the voice is crystal clear.
@BackToBackSWE4 жыл бұрын
RODE VideoMic, the red one
@saravanprathi69564 жыл бұрын
Thanks a ton for this video, it really helped me!!
@BackToBackSWE4 жыл бұрын
sure
@throwsand23 жыл бұрын
you videos are super helpful, thanks so much!
@ilya11313 жыл бұрын
didnt understood the culc of D, how is AD longer then AFD if the distance between AD is 7, and the distance between AFD is 5+7=12 (in the video its somehow 6)
@shantanutripathi4 жыл бұрын
Why no one is talking about what if cycle comes in while selecting the minimum edge and then we have to check for condition of cycle?
@BackToBackSWE4 жыл бұрын
i like your profile pic
@shantanutripathi4 жыл бұрын
@@BackToBackSWE Tell the answer of the question or else I will come to you with 3 other friends of mine :)
@goodwish15435 жыл бұрын
Good idea to classify them. Thanks for teaching.
@BackToBackSWE5 жыл бұрын
sure
@atulmalakar5 жыл бұрын
Hey Ben this video was definitely very informative and nice like your other videos. However I have a request, can you please make a tutorial on maximum subarray sum using Divide and Conquer as there are not very good tutorials or blogs on the internet. I totally understand if you have different plans for your upcoming videos but this is just another fan request. Please give your suggestions.
@BackToBackSWE5 жыл бұрын
ok
@BackToBackSWE5 жыл бұрын
I think I have a video on that, max contiguous subarray sum
@atulmalakar5 жыл бұрын
@@BackToBackSWE yes yes there is, but it is Kadane's algorithm and what I am asking for is Divide and Conquer solution. Thanks anyways !
@BackToBackSWE5 жыл бұрын
@@atulmalakar ah, true, I may
@99ansh4 жыл бұрын
Did anyone notice a bull shadow on the t-shirt? It's cool.
@BackToBackSWE4 жыл бұрын
what lol
@TheKseth4 жыл бұрын
@@BackToBackSWE My man is a Dwayne Johnson fan
@parthokr4 жыл бұрын
Can you make a video on bellman ford algorithm?
@BackToBackSWE4 жыл бұрын
probably not it is niche and complicated
@jacekwzgorzeeliminujaczosl40363 жыл бұрын
What happens when we stop developing people and reach our goals? We can all decide. But we can fight with disease and easily destroy it. We have the right to punish others, including children. How safe are all the medical centers in Spain? During the shortest period of human history, the Spanish Empire conquered Porto del Sur. "I only do nothing but shoes. I want to improve your life in Scotland and Spain. The king has been his friend for centuries, you can only serve the poor and the average. Often in the military. People say that chocolate and tobacco production Are successful. ".
@eugenemolokov34275 жыл бұрын
Nice to see you back :)
@BackToBackSWE5 жыл бұрын
hey
@ShaliniNegi244 жыл бұрын
This guy is a Gem!
@BackToBackSWE4 жыл бұрын
no ur a gem
@mohnishsinghbhamra3 жыл бұрын
you explained Prims MST in a kind of kruskal way
@supamdeepbains51724 жыл бұрын
Dear Mr.Back to Back SWE, Hi there, I hope you're doing well, I just want to say that wonderful explanation as always on every video, but which one would you prefer to be used over another bro? Thanks Warm Regards,
@BackToBackSWE4 жыл бұрын
Hi, preference for algorithms? not sure what you mean
@supamdeepbains51724 жыл бұрын
@@BackToBackSWE Hi there , Yes bro for example which one is faster in order to use? Thanks Warm Regards,
@francescopiazza488211 ай бұрын
Very good, thanks !
@inigo18803 жыл бұрын
MY DUDE IS RIPPED!
@Naradmaxwell4 жыл бұрын
how do you find the LOWEST COST VERTEX ??
@BackToBackSWE4 жыл бұрын
not sure
@NinoCuteCute3 жыл бұрын
Nice,help me a lot
@ANGELINK9995 жыл бұрын
Awesome video!
@BackToBackSWE5 жыл бұрын
thx
@ShubhamKumar-rt8nb5 жыл бұрын
why do you not choose the edge from F to G it also has a weight of 6
@ShubhamKumar-rt8nb5 жыл бұрын
@@iklilios thanks to clear it
@BackToBackSWE5 жыл бұрын
nice
@soumadip_banerjee5 жыл бұрын
Love ur vids as usual!
@BackToBackSWE5 жыл бұрын
yo
@silviapetrova85623 жыл бұрын
Thank you
@elleb60183 жыл бұрын
Thank you ❤️
@taehyeonkim39004 жыл бұрын
where is your emphasizing voice!?
@BackToBackSWE4 жыл бұрын
wut
@JavaAidTutorials5 жыл бұрын
WAR between Dijkstra and Prims...:)
@BackToBackSWE5 жыл бұрын
yes
@judgebot7353 Жыл бұрын
thanks
@prashanthvaidya5 жыл бұрын
Great video. :) Especially Prim's algorithm and the "vision" bit was spot on. One caveat though! You mentioned going back could help if there was a negative edge, but Dijkstra's Algorithm fails to find a shortest path for a graph with negative weights. Once a vertex is taken out of the heap, it is assumed that the shortest possible path for that vertex has already been found.
@BackToBackSWE5 жыл бұрын
Oh true, good point, I remember saying that and questioning if it was true