Shortest Path Algorithms (Dijkstra and Bellman-Ford) - Simplified

  Рет қаралды 228,242

Abdul Bari

Abdul Bari

Күн бұрын

Пікірлер: 58
@anuragtiwari2511
@anuragtiwari2511 4 жыл бұрын
in last part of the video sir asked for feedback, here it is Those who are new to sir let me tell you he is a "legend", he can make even a dumber guy understand these DAA algos trust me he is such a legend.
@mukeshmahadev7419
@mukeshmahadev7419 5 жыл бұрын
It's really really helpful. Thanks you Sir, finally understood Bellman Ford and Dijkstra's algorithm completely with comparison. You have covered all the possible doubts that I had got while understanding, that's the best part. Thanks a lot again.
@saprra1
@saprra1 3 ай бұрын
Sir without you my DSA =0 i was breaking my head , could nt understand anything. Thanks for making coding easy
@prashantkamble898
@prashantkamble898 7 жыл бұрын
awesome explanation. much better than engineering colleges.
@subhrenduchattopadhyay
@subhrenduchattopadhyay 5 ай бұрын
Complexity analysis of bellman-ford (19:35): O(V times E ) -> O(V^3) as |E| can be v*(v-1) for completely connected graph/clique.
@prodbyjaswant551
@prodbyjaswant551 Ай бұрын
You are over counting. Each edge from each vertex will be connected to another vertex hence max |E| = v(v-1)/2.
@subhrenduchattopadhyay
@subhrenduchattopadhyay 29 күн бұрын
@prodbyjaswant551 The complexity remains the same. O(v^3).
@maverickchinmaydas
@maverickchinmaydas 4 жыл бұрын
Hi +Abdul Bari sir - Why we have taken d vertex first when we deal with negative vertex in bellmanford algorithm (15:38) . We could start with (a,c) (c,d)(d,b) (a,b) rather we selected (d,b) (c,d) (a,c) (a,b) . Can you please explain once again why ?
@aishwaryaratnam154
@aishwaryaratnam154 7 жыл бұрын
Sir your explanation was like a cutting edge . thank you so much
@Antakya0001
@Antakya0001 Жыл бұрын
Abdul Bari >>>> university professors Best teacher!
@Malik-bx6qg
@Malik-bx6qg 6 жыл бұрын
You have a mistake sir, in the first example (time: 6:35), you said that the shortest path from P to T is "7", it is not !. It is 5, from P > Q > R > U > T (1+1+1+2=5). Please check this
@Malik-bx6qg
@Malik-bx6qg 6 жыл бұрын
Aaa, now I know. Thank you for the explanation. My comment is useful though.
@javariamalik8475
@javariamalik8475 3 ай бұрын
Where is the explanation. I'm not able to understand it ​@@Malik-bx6qg
@neerajnishad4689
@neerajnishad4689 3 жыл бұрын
Sir please come back to KZbin, world needs you!!!
@MastAdmiLive
@MastAdmiLive 2 жыл бұрын
Our teachers gave us 150slides of ppt
@aradhyajain9575
@aradhyajain9575 7 жыл бұрын
very good explanation....watched a lot of videos and finally got yours one.....thanks!!
@debarkasengupta4500
@debarkasengupta4500 7 жыл бұрын
Extremely well described. Very good teaching skills.
@tasmiyamuazzam8972
@tasmiyamuazzam8972 6 жыл бұрын
Sir.. lekin fr kya krenge agr negative cycle exist kregi to..
@mayanktripathi3666
@mayanktripathi3666 5 жыл бұрын
Ans of dijkstra algorithm of this diagram with path my ans is a->b->c->d->e->f.
@kunalkheeva
@kunalkheeva 2 жыл бұрын
How are you so greatly simplifying the algorithms?? Thank you sir>>>>
@TonyDaExpert
@TonyDaExpert 3 жыл бұрын
I am gonna watch these videos till I master the theory well and I will buy your c++/c data structure course you are amazing
@cse530
@cse530 3 жыл бұрын
Hlo bro did u buy the courses
@TheWhiteBreadMan
@TheWhiteBreadMan 3 жыл бұрын
Thank you, that helped me a lot!
@haneulkim4902
@haneulkim4902 4 жыл бұрын
Thanks for the video! @13:32 you say that once shortest path has been found it cannot be updated hence dijkstra algorithm sometimes fail with negative weight edges. However replacing 1-4 edge with 10 and 3-4 edge with 2, it will do the same thing as having 1-4 edge = 1 , 3-4edge = -6. Does that mean it sometimes doesn't work for positive weight edges too?
@haneulkim4902
@haneulkim4902 4 жыл бұрын
@@abdul_bari But you said once vertex is relaxed it cannot be relaxed again that is why it failed with negative weights.
@usamamohiuddin7904
@usamamohiuddin7904 Жыл бұрын
at 25:00 the cost should be -2, but thanks for the amazing video otherwise!
@edwinthomas9174
@edwinthomas9174 7 жыл бұрын
best explanation ever !!!!
@asifanawaz38
@asifanawaz38 3 жыл бұрын
What should we do if the arrows are not mentioned in the question? How should we proceed then?
@muezabebe5669
@muezabebe5669 5 жыл бұрын
your tutorial is very inteested
@UnBoxerBHAI
@UnBoxerBHAI 4 жыл бұрын
SIR THERE IS ONE REQUEST PLEASE SWITCH BACK TO TEACHING ON BOARD AS THOSE VIDEO'S WERE MORE INTRESTING THAN THIS. LOVE YOUR VIDEOS
@IcyIndia
@IcyIndia 5 жыл бұрын
Sir please recheck at 5:45 time in this video ... point T should be 5 not 7 .
@zouhairghazi3541
@zouhairghazi3541 5 жыл бұрын
No, it shouldn't. The graph is in fact oriented so you cant travel from vertex U to vertex T.
@TheRealBoroNut
@TheRealBoroNut 7 жыл бұрын
While you're checking for the shortest route I'm already in the pub on my second pint.
@SamaaSeif
@SamaaSeif 8 ай бұрын
when you pick edges for bellman theory, why do u put d-b first? what makes it be in that order
@mahoorkhan630
@mahoorkhan630 7 жыл бұрын
In bellman ford algo why have u taken d vertex first?
@indra16
@indra16 4 жыл бұрын
amazing sir amazing💕😍
@noyonrongon6292
@noyonrongon6292 5 жыл бұрын
awesome explanation.
@lilj1702
@lilj1702 7 жыл бұрын
Isnt F in the second graph actually 7?
@rahimkorbo8158
@rahimkorbo8158 7 жыл бұрын
What if the arrows on the edges are not mentioned for bellman ford algorithm for list of edges? What to do in that situation?
@rahimkorbo8158
@rahimkorbo8158 7 жыл бұрын
On each node?
@spifuntastic621
@spifuntastic621 2 жыл бұрын
25:01 1+3 - 6 = -2
@c.danielpremkumar8495
@c.danielpremkumar8495 6 жыл бұрын
Can't we add 6 to all the edges so that we can deal with all positive values which would make the negative edge equal to 0 ? If it is OK - then nodes 3 and 4 would become a single node. What would this mean ?
@Amitsa299
@Amitsa299 7 жыл бұрын
You are gem
@abuibrahym1182
@abuibrahym1182 6 жыл бұрын
Thanks That was good
@c.danielpremkumar8495
@c.danielpremkumar8495 6 жыл бұрын
What is the practical meaning for a NEGAFIVE edge ?
@Kitty-Corn-3
@Kitty-Corn-3 6 жыл бұрын
Don't limit you thinking about edges just in terms of water flowing through the pipes .. or packets through the network wire .. Think of a case when you're google and sending traffic to a website when customer clicks an ad .. and the edge value is the money you charge ..
@evelynross1043
@evelynross1043 5 жыл бұрын
In real scenarios , it can represent a transaction which can be both positive and negative .
@muhammadaltafhussain3084
@muhammadaltafhussain3084 11 ай бұрын
25:00 1+ 3 -6 = -2 ,
@saurabhmittal2504
@saurabhmittal2504 6 жыл бұрын
1+3-6 = -3😊 don't point it out ,it's a simple mistake
@aakashsharma8687
@aakashsharma8687 4 жыл бұрын
Thank you sir
@ahmadshirazi4757
@ahmadshirazi4757 Жыл бұрын
Perfect💯
@shubhampathak3770
@shubhampathak3770 7 жыл бұрын
awesome
@shareefudin2164
@shareefudin2164 7 жыл бұрын
thanku
@radnustech7762
@radnustech7762 6 жыл бұрын
Best
@gameslife9179
@gameslife9179 Жыл бұрын
Great
@abhishek_sengupta
@abhishek_sengupta 4 жыл бұрын
Thanks a lot!
@vineetchauhan8192
@vineetchauhan8192 5 жыл бұрын
eeeeee
BFS DFS - Simplified
19:13
Abdul Bari
Рет қаралды 202 М.
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,4 МЛН
Dijkstra's Algorithm:  Another example
8:41
barngrader
Рет қаралды 801 М.
G-41. Bellman Ford Algorithm
27:43
take U forward
Рет қаралды 251 М.
Bellman-Ford in 5 minutes - Step by step example
5:10
Michael Sambol
Рет қаралды 1,5 МЛН
Hashing Technique - Simplified
17:04
Abdul Bari
Рет қаралды 791 М.
3.6 Dijkstra Algorithm - Single Source Shortest Path - Greedy Method
18:35
Graph Data Structure 4. Dijkstra’s Shortest Path Algorithm
10:52
Computer Science Lessons
Рет қаралды 1,5 МЛН
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН