diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index c6c487a0..1214b5e2 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -52,4 +52,5 @@
| Ankita Sinha Ray |ankitasray|
| Aditya Pandey |Aditya7pandey|
| Yash Bandal |Yash Bandal|
-| Harshit Jaiswal |Harshit Jaiswal|
\ No newline at end of file
+| Harshit Jaiswal |Harshit Jaiswal|
+| mani-252 |mani-353|
diff --git a/DSA_C++/Floyd-Warshall-algo.cpp b/DSA_C++/Floyd-Warshall-algo.cpp
new file mode 100644
index 00000000..8dd0a268
--- /dev/null
+++ b/DSA_C++/Floyd-Warshall-algo.cpp
@@ -0,0 +1,58 @@
+#include
+using namespace std;
+
+#define INF 99999
+#define V 4
+
+// A function to print the solution matrix
+void printSolution(int dist[V][V]) {
+ cout << "The following matrix shows the shortest distances between every pair of vertices:\n";
+ for (int i = 0; i < V; i++) {
+ for (int j = 0; j < V; j++) {
+ if (dist[i][j] == INF)
+ cout << "INF ";
+ else
+ cout << dist[i][j] << " ";
+ }
+ cout << endl;
+ }
+}
+
+// All-pairs shortest path algorithm (Floyd-Warshall)
+void floydWarshall(int graph[V][V]) {
+ int dist[V][V];
+
+ // Initialize the solution matrix same as input graph matrix
+ for (int i = 0; i < V; i++)
+ for (int j = 0; j < V; j++)
+ dist[i][j] = graph[i][j];
+
+ // Update the solution matrix with shortest paths
+ for (int k = 0; k < V; k++) {
+ for (int i = 0; i < V; i++) {
+ for (int j = 0; j < V; j++) {
+ if (dist[i][k] + dist[k][j] < dist[i][j])
+ dist[i][j] = dist[i][k] + dist[k][j];
+ }
+ }
+ }
+
+ // Print the shortest path matrix
+ printSolution(dist);
+}
+
+int main() {
+ /* Input graph represented as adjacency matrix.
+ INF means there is no edge between those vertices */
+ int graph[V][V] = {
+ {0, 3, INF, 5},
+ {2, 0, INF, 4},
+ {INF, 1, 0, INF},
+ {INF, INF, 2, 0}
+ };
+
+ // Run Floyd-Warshall algorithm
+ floydWarshall(graph);
+
+ return 0;
+}