Add greedy algorithms content

pull/2901/head
Kamran Ahmed 2 years ago
parent 242d755de6
commit 4405919d57
  1. 2
      content/roadmaps/103-computer-science/content/104-common-algorithms/104-greedy-algorithms/100-dijkstras-algorithm.md
  2. 9
      content/roadmaps/103-computer-science/content/104-common-algorithms/104-greedy-algorithms/101-huffman-coding.md
  3. 8
      content/roadmaps/103-computer-science/content/104-common-algorithms/104-greedy-algorithms/102-kruskas-algorithm.md
  4. 9
      content/roadmaps/103-computer-science/content/104-common-algorithms/104-greedy-algorithms/103-ford-fulkerson-algorithm.md
  5. 9
      content/roadmaps/103-computer-science/content/104-common-algorithms/104-greedy-algorithms/104-prims-algorithm.md
  6. 11
      content/roadmaps/103-computer-science/content/104-common-algorithms/104-greedy-algorithms/readme.md

@ -1,6 +1,8 @@
# Dijkstra's Algorithm # Dijkstra's Algorithm
Dijkstra's algorithm is a greedy algorithm that finds the shortest path between two nodes in a graph. It is a very common algorithm used in computer science and is used in many applications such as GPS navigation, network routing, and finding the shortest path in a maze.
<ResourceGroupTitle>Free Content</ResourceGroupTitle> <ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=_lHSawdgXpI'>Dijkstra's Algorithm in 3 Minutes</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=NSHizBK9JD8&t=1731s&ab_channel=MITOpenCourseWare'>Dijkstra's Algorithm - MIT</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=CHvQ3q_gJ7E&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=18'>Speeding Up Dijkstra's Algorithm - MIT</BadgeLink> <BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=CHvQ3q_gJ7E&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=18'>Speeding Up Dijkstra's Algorithm - MIT</BadgeLink>

@ -1 +1,8 @@
# Huffman coding # Huffman Coding
Huffman coding is a lossless data compression algorithm. The idea is to assign variable-length codes to input characters, lengths of the assigned codes are based on the frequencies of corresponding characters. The most frequent character gets the smallest code and the least frequent character gets the largest code.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.programiz.com/dsa/huffman-coding'>Huffman Coding</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/huffman-coding-greedy-algo-3/'>Huffman Coding | Greedy Algo-3</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=co4_ahEDCho'>Huffman Coding - Greedy Method</BadgeLink>

@ -1 +1,7 @@
# Kruskas algorithm # Kruskal's algorithm
Kruskal's algorithm is a greedy algorithm that finds a minimum spanning tree for a connected weighted graph. It is a minimum spanning tree algorithm that takes a graph as input and finds the subset of the edges of that graph which form a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. If the graph is not connected, then it finds a minimum spanning forest (a minimum spanning tree for each connected component).
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=71UQH7Pr9kU'>Kruskal's Algorithm in 2 Minutes</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=ufj5_bppBsA&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&index=8'>Graph Algorithms II - DFS, BFS, Kruskal's Algorithm, Union Find Data Structure - Lecture 7</BadgeLink>

@ -1 +1,8 @@
# Ford fulkerson algorithm # Ford Fulkerson Algorithm
Ford Fulkerson Algorithm is a greedy algorithm that is used to find the maximum flow in a flow network. It is also known as the Edmonds-Karp Algorithm.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=Tl90tNtKvxs'>Ford-Fulkerson in 5 minutes</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/ford-fulkerson-algorithm-for-maximum-flow-problem/'>Ford-Fulkerson Algorithm for Maximum Flow Problem</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.programiz.com/dsa/ford-fulkerson-algorithm'>Ford-Fulkerson Algorithm</BadgeLink>

@ -1 +1,8 @@
# Prims algorithm # Prim's Algorithm
Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. A minimum spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. A minimum spanning tree for a weighted undirected graph is also called a minimum weight spanning tree or minimum cost spanning tree.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.youtube.com/watch?v=i_AQT_XfvD8&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&index=7'>Graph Algorithms I - Topological Sorting, Prim's Algorithm - Lecture 6</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/prims-minimum-spanning-tree-mst-greedy-algo-5/'>Prim’s Minimum Spanning Tree (MST) | Greedy Algo-5</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.programiz.com/dsa/prim-algorithm'>Prim's Algorithm</BadgeLink>

@ -1 +1,10 @@
# Greedy algorithms # Greedy Algorithms
Greedy algorithms are a type of algorithm that always makes the choice that seems to be the best at that moment. This means that it makes a locally-optimal choice in the hope that this choice will lead to a globally-optimal solution.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/greedy-algorithms/'>Greedy Algorithms - Geeks for Geeks</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.programiz.com/dsa/greedy-algorithm'>Greedy Algorithms - Programiz</BadgeLink>
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=bC7o8P_Ste4'>Greedy Algorithms Tutorial – Solve Coding Challenges</BadgeLink>

Loading…
Cancel
Save