Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/jerry-felipe/javacleancode

Implementation of Java's most famous algorithms, including sorting (QuickSort, MergeSort), searching (Binary Search), and graph traversal (DFS, BFS). Each algorithm is optimized for performance, explained with examples, and designed to showcase core Java capabilities in solving computational problems.
https://github.com/jerry-felipe/javacleancode

clean-code csharp java python

Last synced: about 1 month ago
JSON representation

Implementation of Java's most famous algorithms, including sorting (QuickSort, MergeSort), searching (Binary Search), and graph traversal (DFS, BFS). Each algorithm is optimized for performance, explained with examples, and designed to showcase core Java capabilities in solving computational problems.

Awesome Lists containing this project

README

        

# Java Famous Algorithms Collection

This repository contains implementations of some of the most famous and widely-used algorithms in Java. Each algorithm is designed to demonstrate efficiency, clarity, and practical application, complete with examples and explanations.

# Algorithms Included

# Sorting Algorithms
- QuickSort: A divide-and-conquer algorithm that efficiently sorts data by partitioning.
- MergeSort: A stable, recursive sorting algorithm ideal for large datasets.
- BubbleSort: A simple sorting algorithm for small datasets.

# Searching Algorithms
- Binary Search: Fast searching in sorted arrays with O(log n) complexity.
- Linear Search: A straightforward search method for unsorted datasets.

# Graph Traversal Algorithms
- Depth-First Search (DFS): Explores as far as possible along a branch before backtracking.
- Breadth-First Search (BFS): Explores all neighbors at the present depth before moving deeper.

# Features
- 🛠 Well-documented code: Clear comments and step-by-step explanations.
- 🚀 Optimized implementations: Focused on performance and readability.
- 📚 Usage examples: Real-world scenarios and test cases for each algorithm.

# Getting Started

# Prerequisites
- Java Development Kit (JDK 17 or higher)
- A code editor or IDE (e.g., IntelliJ IDEA, Eclipse)

# Setup
1. Clone the repository:
'''bash
git clone https://github.com/jerry-felipe/java-famous-algorithms.git
cd java-famous-algorithms
'''

2. Open the project in your favorite IDE.

3. Run the desired algorithm:
- Navigate to the 'src/' folder.
- Execute the example files to see the algorithm in action.

# Usage
1. Explore the 'src/' folder for individual algorithm implementations.
2. Modify input arrays or graphs in the example files to test with custom data.
3. Run the examples:
'''bash
javac src/QuickSortExample.java
java src/QuickSortExample
'''

# Contributing
Contributions are welcome!
To contribute:
1. Fork the repository.
2. Create a feature branch:
'''bash
git checkout -b feature/new-algorithm
'''
3. Commit your changes:
'''bash
git commit -m "Add a new algorithm implementation"
'''
4. Push the branch:
'''bash
git push origin feature/new-algorithm
'''
5. Open a pull request.

# License
This project is licensed under the MIT License. See the 'LICENSE' file for details.

---

# Contact
For questions or feedback, feel free to reach out:
- GitHub Issues: [https://github.com/jerry-felipe/java-famous-algorithms/issues](https://github.com/jerry-felipe/java-famous-algorithms/issues)
- Email: [email protected]