Add graph traversal algorithm

pull/2901/head
Kamran Ahmed 2 years ago
parent e2b1d4b6bc
commit 242d755de6
  1. 9
      content/roadmaps/103-computer-science/content/104-common-algorithms/102-graph-algorithms/100-breadth-first-search.md
  2. 7
      content/roadmaps/103-computer-science/content/104-common-algorithms/102-graph-algorithms/101-depth-first-search.md
  3. 3
      content/roadmaps/103-computer-science/content/104-common-algorithms/102-graph-algorithms/102-bellman-fords-algorithm.md
  4. 2
      content/roadmaps/103-computer-science/content/104-common-algorithms/102-graph-algorithms/103-dijkstras-algorithm.md
  5. 8
      content/roadmaps/103-computer-science/content/104-common-algorithms/102-graph-algorithms/104-a-star-algorithm.md
  6. 2
      content/roadmaps/103-computer-science/content/104-common-algorithms/102-graph-algorithms/readme.md

@ -1 +1,8 @@
# Breadth first search # Breadth First Search
Breadth first search for a graph is a way to traverse the graph. It starts at the root node and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/breadth-first-search-or-bfs-for-a-graph/'>Breadth First Search or BFS for a Graph</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=ufj5_bppBsA&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&index=7'>Graph Algorithms II - DFS, BFS, Kruskal's Algorithm, Union Find Data Structure - Lecture 7</BadgeLink>

@ -1 +1,6 @@
# Depth first search # Depth First Search
Depth first search is a graph traversal algorithm that starts at a root node and explores as far as possible along each branch before backtracking.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/?ref=lbp'>Depth First Search or DFS for a Graph</BadgeLink>

@ -1,4 +1,7 @@
# Bellman Ford's Algorithm # Bellman Ford's Algorithm
Bellman ford's algorithm is a graph algorithm that finds the shortest path from a source vertex to all other vertices in a graph. It is a dynamic programming algorithm that uses a bottom-up approach to find the shortest path. It is similar to Dijkstra's algorithm but it can handle negative weights. It is also similar to Floyd-Warshall's algorithm but it can handle negative weights and it is faster than Floyd-Warshall's algorithm.
<ResourceGroupTitle>Free Content</ResourceGroupTitle> <ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=f9cVS_URPc0&ab_channel=MITOpenCourseWare'>Bellman-Ford - MIT</BadgeLink> <BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=f9cVS_URPc0&ab_channel=MITOpenCourseWare'>Bellman-Ford - MIT</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=9PHkk0UavIM'>Bellman-Ford in 4 Minutes</BadgeLink>

@ -1,5 +1,7 @@
# Dijkstra's Algorithm # Dijkstra's Algorithm
Dijkstra's algorithm is a graph traversal algorithm that finds the shortest path between two nodes in a graph. It is a weighted graph algorithm, meaning that each edge in the graph has a weight associated with it. The algorithm works by finding the shortest path from the starting node to all other nodes in the graph. It does this by keeping track of the distance from the starting node to each node, and then choosing the node with the shortest distance from the starting node to visit next. It then updates the distance of each node from the starting node, and repeats the process until all nodes have been visited.
<ResourceGroupTitle>Free Content</ResourceGroupTitle> <ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=NSHizBK9JD8&t=1731s&ab_channel=MITOpenCourseWare'>Dijkstra's Algorithm - MIT</BadgeLink> <BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=NSHizBK9JD8&t=1731s&ab_channel=MITOpenCourseWare'>Dijkstra's Algorithm - MIT</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=_lHSawdgXpI'>Dijkstra's Algorithm in 3 Minutes</BadgeLink>

@ -1 +1,7 @@
# A star algorithm # A* Algorithm
A* is a graph traversal algorithm that is used to find the shortest path between two nodes in a graph. It is a modified version of Dijkstra's algorithm that uses heuristics to find the shortest path. It is used in pathfinding and graph traversal.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://en.wikipedia.org/wiki/A*_search_algorithm'>A* Search Algorithm - Wikipedia</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=-L-WgKMFuhE'>A* Pathfinding (E01: algorithm explanation)</BadgeLink>

@ -1,5 +1,7 @@
# Graph Algorithms # Graph Algorithms
Graphs in data structures are non-linear data structures made up of a finite number of nodes or vertices and the edges that connect them. Graphs in data structures are used to address real-world problems in which it represents the problem area as a network like telephone networks, circuit networks, and social networks.
<ResourceGroupTitle>Free Content</ResourceGroupTitle> <ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=i_AQT_XfvD8&index=6&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm'>Graph Algorithms I - Topological Sorting, Minimum Spanning Trees, Prim's Algorithm - Lecture 6</BadgeLink> <BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=i_AQT_XfvD8&index=6&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm'>Graph Algorithms I - Topological Sorting, Minimum Spanning Trees, Prim's Algorithm - Lecture 6</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=ufj5_bppBsA&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&index=7'>Graph Algorithms II - DFS, BFS, Kruskal's Algorithm, Union Find Data Structure - Lecture 7</BadgeLink> <BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=ufj5_bppBsA&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&index=7'>Graph Algorithms II - DFS, BFS, Kruskal's Algorithm, Union Find Data Structure - Lecture 7</BadgeLink>

Loading…
Cancel
Save