This project is an implementation of graphs using adjacency matrices in Java. It includes algorithms to find shortest paths and detect cycles.
- Create a graph with a specified number of vertices.
- Add weighted edges.
- Print the adjacency matrix.
- Find the shortest path using the Bellman-Ford algorithm.
- Detect cycles in the graph.
- Perform a pre-order traversal.
- Calculate the height of the "tree" from a given node.
- Find the shortest path between two vertices using Dijkstra's algorithm.
Compile and run the Main
class to see an example usage
This project is licensed under the MIT License - see the LICENSE file for details.