Skip to content

Commit abc3667

Browse files
committed
docs: Add visual enhancements and improve README structure
1 parent e6cb96f commit abc3667

File tree

1 file changed

+325
-9
lines changed

1 file changed

+325
-9
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 325 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,336 @@
1-
# The Algorithms - Java
1+
<div align="center">
2+
3+
# πŸ”· The Algorithms - Java
4+
5+
<img src="https://upload.wikimedia.org/wikipedia/en/3/30/Java_programming_language_logo.svg" alt="Java Logo" width="200"/>
6+
7+
### All algorithms implemented in Java (for educational purposes)
28

39
[![Build](https://github.com/TheAlgorithms/Java/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/TheAlgorithms/Java/actions/workflows/build.yml)
410
[![codecov](https://codecov.io/gh/TheAlgorithms/Java/graph/badge.svg?token=XAdPyqTIqR)](https://codecov.io/gh/TheAlgorithms/Java)
511
[![Discord chat](https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=7289DA&style=flat-square)](https://discord.gg/c7MnfGFGa6)
612
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/TheAlgorithms/Java)
713

14+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TheAlgorithms/Java)
815

9-
You can run and edit the algorithms, or contribute to them using Gitpod.io (a free online development environment) with a single click.
16+
---
1017

11-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TheAlgorithms/Java)
18+
**[πŸ“š Explore Algorithms](DIRECTORY.md)** β€’ **[🀝 Contributing](CONTRIBUTING.md)** β€’ **[πŸ’¬ Community](https://discord.gg/c7MnfGFGa6)**
19+
20+
</div>
21+
22+
<br>
23+
24+
```
25+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
26+
β”‚ β”‚
27+
β”‚ πŸ“– Educational implementations of algorithms in Java β”‚
28+
β”‚ 🎯 Focus on code clarity and learning β”‚
29+
β”‚ πŸ§ͺ Comprehensive test coverage β”‚
30+
β”‚ πŸ“ Well-documented with JavaDoc β”‚
31+
β”‚ β”‚
32+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
33+
```
34+
35+
## πŸ“– Overview
36+
37+
This repository contains **Java implementations** of common algorithms and data structures. These implementations are for **learning purposes** and prioritize code clarity over performance. They may be less efficient than the Java standard library.
38+
39+
<details>
40+
<summary><b>🎁 What's Inside?</b></summary>
41+
42+
<br>
43+
44+
| Feature | Description |
45+
|---------|-------------|
46+
| πŸ“ **Clean Code** | Readable implementations with clear variable names |
47+
| πŸ§ͺ **Test Coverage** | JUnit test coverage for most algorithms |
48+
| πŸ“š **Documentation** | JavaDoc comments with time/space complexity |
49+
| β˜• **Modern Java** | Leverages Java 21 features |
50+
| πŸ—‚οΈ **Organized** | Algorithms grouped by category |
51+
52+
</details>
53+
54+
---
55+
56+
## πŸš€ Getting Started
57+
58+
<table>
59+
<tr>
60+
<td width="50%">
61+
62+
### πŸ“‹ Prerequisites
63+
64+
```bash
65+
β˜• Java 21+
66+
πŸ“¦ Maven 3.6+
67+
```
68+
69+
</td>
70+
<td width="50%">
71+
72+
### ⚑ Quick Setup
73+
74+
```bash
75+
git clone https://github.com/TheAlgorithms/Java.git
76+
cd Java
77+
mvn clean compile
78+
mvn test
79+
```
80+
81+
</td>
82+
</tr>
83+
</table>
84+
85+
---
86+
87+
## πŸ’‘ Usage Examples
88+
89+
<div align="center">
90+
91+
```mermaid
92+
graph LR
93+
A[Import Algorithm] --> B[Call Method]
94+
B --> C[Get Result]
95+
style A fill:#e1f5ff
96+
style B fill:#fff3e0
97+
style C fill:#e8f5e9
98+
```
99+
100+
</div>
101+
102+
All algorithms are implemented as static methods. Import and use them directly:
103+
104+
<table>
105+
<tr>
106+
<td width="50%">
107+
108+
**πŸ“Š Dynamic Programming**
109+
```java
110+
import com.thealgorithms.dynamicprogramming.Fibonacci;
111+
112+
int fib = Fibonacci.fibonacci(10); // 55
113+
```
114+
115+
**πŸ”€ Sorting**
116+
```java
117+
import com.thealgorithms.sorts.QuickSort;
118+
119+
int[] array = {64, 34, 25, 12, 22, 11, 90};
120+
QuickSort.quickSort(array, 0, array.length - 1);
121+
```
122+
123+
</td>
124+
<td width="50%">
125+
126+
**🌐 Graph Algorithms**
127+
```java
128+
import com.thealgorithms.datastructures.graphs.DijkstraAlgorithm;
129+
130+
int[][] graph = {{0, 4, 0}, {4, 0, 8}, {0, 8, 0}};
131+
DijkstraAlgorithm dijkstra = new DijkstraAlgorithm(3);
132+
int[] distances = dijkstra.run(graph, 0);
133+
```
134+
135+
**πŸ“¦ Data Structures**
136+
```java
137+
import com.thealgorithms.datastructures.stacks.BalancedBrackets;
138+
139+
boolean isBalanced = BalancedBrackets.isBalanced("{[()]}");
140+
```
141+
142+
</td>
143+
</tr>
144+
</table>
145+
146+
---
147+
148+
## πŸ“š Algorithm Categories
149+
150+
<div align="center">
151+
152+
```
153+
╔═══════════════════════════════════════════════════════════════╗
154+
β•‘ ALGORITHM CATEGORIES β•‘
155+
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
156+
```
157+
158+
</div>
159+
160+
<table>
161+
<tr>
162+
<td width="50%" valign="top">
163+
164+
### πŸ” Sorting & Searching
165+
```
166+
β”œβ”€β”€ Binary Search
167+
β”œβ”€β”€ Linear Search
168+
β”œβ”€β”€ Jump Search
169+
β”œβ”€β”€ Quick Sort
170+
β”œβ”€β”€ Merge Sort
171+
β”œβ”€β”€ Heap Sort
172+
└── Radix Sort
173+
```
174+
175+
### 🌳 Data Structures
176+
```
177+
β”œβ”€β”€ Trees
178+
β”‚ β”œβ”€β”€ BST
179+
β”‚ β”œβ”€β”€ AVL
180+
β”‚ └── Red-Black
181+
β”œβ”€β”€ Graphs
182+
β”‚ β”œβ”€β”€ DFS / BFS
183+
β”‚ β”œβ”€β”€ Dijkstra
184+
β”‚ └── Bellman-Ford
185+
└── Collections
186+
β”œβ”€β”€ Stacks
187+
β”œβ”€β”€ Queues
188+
└── Heaps
189+
```
190+
191+
</td>
192+
<td width="50%" valign="top">
193+
194+
### 🎯 Algorithm Techniques
195+
```
196+
β”œβ”€β”€ Dynamic Programming
197+
β”‚ β”œβ”€β”€ Knapsack
198+
β”‚ β”œβ”€β”€ LCS
199+
β”‚ └── Edit Distance
200+
β”œβ”€β”€ Greedy Algorithms
201+
β”œβ”€β”€ Backtracking
202+
β”‚ β”œβ”€β”€ N-Queens
203+
β”‚ └── Sudoku Solver
204+
└── Divide & Conquer
205+
```
206+
207+
### πŸ” Other Topics
208+
```
209+
β”œβ”€β”€ Cryptography & Ciphers
210+
β”œβ”€β”€ Mathematical Algorithms
211+
β”œβ”€β”€ String Manipulation
212+
β”œβ”€β”€ Bit Operations
213+
└── Audio Processing
214+
```
215+
216+
</td>
217+
</tr>
218+
</table>
219+
220+
<div align="center">
221+
222+
πŸ“‹ **[View Complete Directory β†’](DIRECTORY.md)**
223+
224+
</div>
225+
226+
---
227+
228+
## 🀝 Contributing
229+
230+
<div align="center">
231+
232+
```mermaid
233+
graph LR
234+
A[🍴 Fork] --> B[πŸ”¨ Code]
235+
B --> C[βœ… Test]
236+
C --> D[πŸ“€ PR]
237+
D --> E[πŸŽ‰ Merge]
238+
style A fill:#e3f2fd
239+
style B fill:#fff3e0
240+
style C fill:#e8f5e9
241+
style D fill:#fce4ec
242+
style E fill:#f3e5f5
243+
```
244+
245+
</div>
246+
247+
We welcome contributions! Please read our **[Contribution Guidelines](CONTRIBUTING.md)** before you contribute.
248+
249+
<table>
250+
<tr>
251+
<td width="50%">
252+
253+
### πŸš€ Quick Start
254+
255+
```bash
256+
# 1. Fork & Clone
257+
git clone https://github.com/YOUR_USERNAME/Java.git
258+
259+
# 2. Create Branch
260+
git checkout -b feature/your-algorithm
261+
262+
# 3. Make Changes & Commit
263+
git commit -m "Add: Algorithm name"
264+
265+
# 4. Push & Create PR
266+
git push origin feature/your-algorithm
267+
```
268+
269+
</td>
270+
<td width="50%">
271+
272+
### βœ… Requirements
273+
274+
- **JavaDoc** - Document your code
275+
- **Tests** - Include JUnit tests
276+
- **Style** - Follow existing patterns
277+
- **Directory** - Update DIRECTORY.md
278+
279+
<br>
280+
281+
> ⚠️ **Note:** We do **not** accept LeetCode problems. Focus on well-known algorithms.
282+
283+
</td>
284+
</tr>
285+
</table>
286+
287+
---
288+
289+
## 🌐 Community & Support
290+
291+
<div align="center">
292+
293+
<table>
294+
<tr>
295+
<td align="center" width="33%">
296+
<img src="https://img.icons8.com/color/96/000000/discord-logo.png" width="50"/><br>
297+
<b>Discord</b><br>
298+
<a href="https://discord.gg/c7MnfGFGa6">Join discussions</a>
299+
</td>
300+
<td align="center" width="33%">
301+
<img src="https://img.icons8.com/fluency/96/000000/bug.png" width="50"/><br>
302+
<b>Issues</b><br>
303+
<a href="https://github.com/TheAlgorithms/Java/issues">Report bugs</a>
304+
</td>
305+
<td align="center" width="33%">
306+
<img src="https://img.icons8.com/fluency/96/000000/globe.png" width="50"/><br>
307+
<b>Website</b><br>
308+
<a href="https://the-algorithms.com">Explore more</a>
309+
</td>
310+
</tr>
311+
</table>
312+
313+
</div>
314+
315+
---
316+
317+
<div align="center">
318+
319+
## πŸ“„ License
320+
321+
Licensed under the [MIT License](LICENSE).
322+
323+
<br>
324+
325+
```
326+
╔════════════════════════════════════════════════════════╗
327+
β•‘ Made with ❀️ by The Algorithms Community β•‘
328+
β•‘ ⭐ Star this repository if you find it helpful! β•‘
329+
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
330+
```
12331

13-
### All algorithms are implemented in Java (for educational purposes)
14-
These implementations are intended for learning purposes. As such, they may be less efficient than the Java standard library.
332+
<br>
15333

16-
## Contribution Guidelines
17-
Please read our [Contribution Guidelines](CONTRIBUTING.md) before you contribute to this project.
334+
**[⬆ Back to Top](#-the-algorithms---java)**
18335

19-
## Algorithms
20-
Our [directory](DIRECTORY.md) has the full list of applications.
336+
</div>

0 commit comments

Comments
Β (0)