Algorithms W3D3 Assignment Playground
This project demonstrates various graph algorithms implemented in Java. It includes both Depth-First Search (DFS) and Breadth-First Search (BFS) implementations, along with functionalities like checking adjacency, finding connected components, spanning tree construction, checking connectivity, and more.
- Java Development Kit (JDK) installed
- Java IDE (Eclipse, IntelliJ, etc.) or a text editor for manual compilation
- Clone the repository to your local machine:
git clone https://github.com/mucahitkayadan/Graphs.git
. Open the project in your preferred Java IDE or compile and run it manually. - Execute the
Main
class to run the graph algorithms and view the results.
The project currently includes the following graph algorithms:
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Spanning Tree Construction
- Checking Adjacency
- Finding Connected Components
- Checking Connectivity
- Detecting Cycles
- Checking if the Graph is a Tree
- Checking if the Graph is Bipartite
- Finding the Length of the Shortest Path
Modify the Main
class to suit your specific graph and algorithm requirements. You can customize the adjacency matrix and choose between DFS and BFS by setting the useDFS
flag in the main method.
// Enter 0 for DFS or 1 for BFS
Contributions are welcome! Please fork the repository and create a pull request with your proposed changes.
This project is licensed under the MIT License.