Dijkstra's Algorithm | Single Source Shortest Path Algorithm in Graph | Dijkstra algorithm Java #82
Vložit
- čas přidán 12. 04. 2022
- Hey guys, In this video, We're going to learn about Dijkstra's Algorithm. This algorithm is used to find the single source shortest distance in a Graph.
Code here: www.geeksforgeeks.org/dijkstr...
🥳 Join our Telegram Community:
Telegram channel: telegram.me/realanujbhaiya
Telegram group: telegram.me/dsa_one
🚀 Follow me on:
Instagram: / anuj.kumar.sharma
Linkedin: / sharma-kumar-anuj
Twitter: / realanujbhaiya
📚 Complete DSA Playlist: • DSA-One Course - The C...
Complete Android Development Playlist: • Android Development Tu...
Hashtags:
#anujbhaiya #dsaone
Tags:
dijkstra algorithm
dijkstra's algorithm
dijkstra algoritması
anuj bhaiya
shortest path algorithm
dijkstra algoritması in hindi
dijkstra algoritm
dijkstra's shortest path algorithm
dijkstra algorithm in data structure
dijkstra algorithm java
dijkstras algorithm
dijkstra’s algorithm
dijkstra algoritmas
dijkstra algorithm shortest path
dijkstra algo
dijkstra’s shortest path algorithm
single source shortest path algorithm
dijkstra's algorithm演算法
dijkstra
djikstra algorithm
dijikstra algorithm
dijkastra algorithm
anuj bhaiya java
dijkstra algorithm code
dijstra algorithm
dijsktra algorithm
dijistra algorithm
dijkistra algorithm
dijkstra algorithm c++
dijkstra algoritma
djistra algorithm
prim's algorithm
dikstra algorithm
dsa
shortest path dijkstra's algorithm
djikstra
djkstra algorithm
greedy algorithm
shortest path
single source shortest path
dijkstra's algorithm演算法 in hindi
all pair shortest path algorithm using dynamic programming
dijikstra
dijkstra algorithm in c
dijkstra algorithm python
dijkstra's algorithm java
djikstras algorithm
graphs in dsa
implementing dijkstra algorithm
prims algo
prims algorithm
anuj bhaiya dsa
dijakstra algorithm
dijastra algorithm
dijkstra's
dijkstra's algorithm code
dijkstra's algorithms
djikstra's algorithm
djkistra algorithm
prims and kruskal algorithm
quick sort c++
shortest path algorithms
shortest path in graph
dijkstra algorithm in c++
dijkstra algorithm in java
dijkstra algorithm code
hey bro, i have started my journey as a programmer 2 months ago, i am currently 23 years old and i have changed my careers 2 times (i am from commerce background btw).
I am really enjoying coding. Its like i found what i should have done all along .
I have become 4 star on code chef in these 2-3 months.
I want to become a 7 start coder at some point in my life.
For someone who had lost confidence because of constantly changing careers and being at age of 23 without achieving anything, you have been a great mentor in my life.
Thankyou Bro for all your free contents and reassurances that anybody can be a programmer.
Same i am almost 23 belong to mechanical stream started programming 45 days ago
@@nawabshahzebuddin1452 good luck bro😚
23 is not old. Work hard. Keep grinding.I have also started coding recently and working hard as you guys are working.
+1
Same I am 23, and frm mech, started 1yr back
Great Bhaiya....
Aaj clg me yahi topic para....and your tutorial is here....thanx bhaiya
Bhaiya..
Jab aapne ye video upload Kiya uske just 5 min bad mera isi topic pr tutorial tha.
Thankyou bhaiya 🤍
Best explaination of Dijkstra and specially its code . I was struggling to code algorithms like this , you made it so simple and understandable
So easy laga bahi
I don't now any DSA
BUT I understand 👍
Thank You So Much for this wonderful video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
You are my only hope in prep for placements
Bhai ye video dekh K confidence build Hua sab real or jiska MATLAB h pure knowledge koi jooth Ni koi fake motivation Ni koi bhadak Ni sab real , aapke mitr to Charam level ka jooth bolta h !!!!!!
Wrong explanation at t 5.01 seconds. Node 2 was not removed. Node 3 (whose distance was 2) was removed. So Node 2 is still under consideration.
Thanks anuj bahi plss bahi upload more video
Awesome explanation 😮
Thanks bhaiya ji
to just simplify this more, even if you don't write if condition to add a new neighbor of current vertex in to priority queue, it will still work fine since priority queue anyways sorts and puts the vertex with less distance ahead, only catch is it will add multiple entries for the same vertex with different weights in the priority queue, which will basically add constant complexity and not change the overall complexity.
Hi, Thanks for all your content. Can you please share any repository link where you have all your codes
Probability & combinations
i suppose there is no requirement of the visited set here.
Kaise ho bhai
Bhaiya Blockchain develop pr roadmap banane wale the, abhi tak nhi banaya🥲
Hi, I'll make it soon 🔥
@@AnujBhaiya thanks for replying bhaiya
For folks who are trying to run it, kindly add
if(!visited[vertex] && ans[vertex] > ans[u] + wt) // this makes sure it doesn't visit parent back
Sirji please correct me if i'm wrong.
I think we don't need the visited array. Since once we visit them in the queue we are popping them so... Maybe we don't need that 🤔
It is needed, if you go and see bellman ford algo video, then you would realize that it is needed else the base case of bellman ford video will work with this code base
I think the reason we add visited in the dijkstra algo is because if you don't do this then time complexity will not be O(elogV) because once you do visited check you are making sure that you are traversing only given edges
Where to get your codes??
Aur kitna time lagega yeh course me?
Job Job dsa ke alawa sir?
First
we don't need visited array here
list.get(0) and list.get(1) dono me 0,1 kyu lia
Plz remove ads
When i click on your vidio i saw 3 ads
Ads are the source of revenue he'll get from people watching the video. I think we should bear watching Ads as a token of gratitude for such great content he is providing..
@@shrutipant7864 i agree
@@shrutipant7864 agree👍👍👍👍
adblocker