#include <bits/stdc++.
h>
using namespace std;
class Graph {
private:
vector<vector<int>> adjMatrix;
int vertices;
public:
Graph(int v) : vertices(v) {
[Link](v, vector<int>(v, 0));
}
void addEdge(int u, int v, int weight) {
adjMatrix[u][v] = weight;
adjMatrix[v][u] = weight;
}
void displayMatrix() {
cout << "Adjacency Matrix:" << endl;
for (int i = 0; i < vertices; i++) {
for (int j = 0; j < vertices; j++) {
cout << adjMatrix[i][j] << " ";
}
cout << endl;
}
}
};
int main() {
int vertices = 5;
Graph g(vertices);
[Link](0, 1, 5); // Edge 0-1 with weight 5
[Link](1, 2, 7); // Edge 1-2 with weight 7
[Link](2, 3, 3); // Edge 2-3 with weight 3
[Link](3, 4, 6); // Edge 3-4 with weight 6
[Link](1, 3, 10); // Edge 1-3 with weight 10
[Link]();
return 0;
}