An open API service indexing awesome lists of open source software.

https://github.com/samyam81/search

This repository contains Java implementations of Breadth-First Search (BFS) and Depth-First Search (DFS) algorithms.
https://github.com/samyam81/search

bfs-algorithm dfs-algorithm graph java search search-algorithm

Last synced: 3 months ago
JSON representation

This repository contains Java implementations of Breadth-First Search (BFS) and Depth-First Search (DFS) algorithms.

Awesome Lists containing this project

README

        

# Search

This repository contains implementations of various search algorithms in Java.

## Overview

The repository includes implementations of Breadth-First Search (BFS) and Depth-First Search (DFS) algorithms in Java.

## BFS Implementation

The BFS algorithm is implemented in the `BFStree` class. It provides a method `bfsOfGraph(int V, ArrayList> adj)` that returns an ArrayList containing the vertices visited in BFS order.

## DFS Implementation

The DFS algorithm is implemented in the `DFS1` class. It uses an adjacency matrix representation of the graph and provides functionality for performing the DFS traversal.

## Usage

To use the implementations in this repository:

1. Clone the repository to your local machine.
2. Use the provided classes in your Java projects.
3. Follow the respective usage instructions for BFS and DFS implementations.

## Contributors

- Samyam.81