You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,13 +178,15 @@ Include contains single header implementation of data structures and some algori
178
178
| calculate the shortest distance from the start position (Node S) to all of the other nodes in the graph using Dijkstra algorithm. |[dijkstra-shortest-reach.cpp](graph_problems/dijkstra-shortest-reach.cpp)|
179
179
| Calculate total weight of Minimum Spanning Tree of a given graph ( sum of weights of edges which forms MST) using Prim's algorithm |[primsMST.cpp](graph_problems/primsMST.cpp)|
180
180
| Print Minimum Spanning Tree( MST ) of a given graph using Kruskal's algorithm.|[kruskalMST.cpp](graph_problems/kruskalMST.cpp)|
181
+
| Create a program to generate a Huffman encoding for each character as a table.|[huffman_encoding.cpp] (greedy_problems/huffman_encoding.cpp)|
181
182
182
183
### Greedy Problems
183
184
| Problem | Solution |
184
185
| :------------ | :----------: |
185
186
| Given two integer arrays, A and B, each containing N integers. You are free to permute the order of the elements in the arrays. Is there an permutation A', B' possible of A and B, such that, A'<sub>i</sub>+B'<sub>i</sub> ≥ K for all i, where A'<sub>i</sub> denotes the i<sup>th</sup> element in the array A' and B'<sub>i</sub> denotes i<sup>th</sup> element in the array B'.|[two_arrays.cpp](greedy_problems/two_arrays.cpp)|
186
187
|John is taking orders. The i<sup>th</sup> order is placed by the i<sup>th</sup> customer at t<sub>i</sub> time and it takes d<sub>i</sub> time to procees. What is the order in which the customers will get their orders? (see more details in solutions's comments)|[orders_order.cpp](greedy_problems/orders_order.cpp)|
0 commit comments