Skip to content

Commit b579c6d

Browse files
author
Wasim
committed
docs: update README with Maven build and testing instructions for new users
1 parent b21bb39 commit b579c6d

1 file changed

Lines changed: 34 additions & 15 deletions

File tree

‎README.md‎

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,40 @@ Contains highly-optimized algorithms categorized by their methodology.
3232

3333
---
3434

35-
## 💻 How to Use
36-
37-
1. **Clone the repository:**
38-
```bash
39-
git clone https://github.com/wasim-builds/Data-Structures-using-java.git
40-
```
41-
2. **Navigate to a concept:**
42-
```bash
43-
cd DataStructures/AdvancedDataStructures
44-
```
45-
3. **Compile and Run:**
46-
```bash
47-
javac AVLTree.java
48-
java AVLTree
49-
```
35+
## 💻 How to Use (For Beginners & Developers)
36+
37+
This project uses **Maven**, the industry standard build tool for Java. This means you do not have to manually compile files one by one!
38+
39+
### 1. Prerequisites
40+
- **Java 17** or higher installed on your machine.
41+
- **Maven** installed (`mvn -version` to verify).
42+
43+
### 2. Clone the Repository
44+
```bash
45+
git clone https://github.com/wasim-builds/Data-Structures-using-java.git
46+
cd DataStructures-using-java
47+
```
48+
49+
### 3. Compile the Code
50+
To compile all 80+ algorithms and data structures at once, simply run:
51+
```bash
52+
mvn clean compile
53+
```
54+
55+
### 4. Run the Automated Tests
56+
We have enterprise-grade unit tests built-in! To prove the algorithms work flawlessly, run:
57+
```bash
58+
mvn test
59+
```
60+
61+
### 5. Running a Specific Algorithm
62+
Because we use proper Java `package` structures, you should run individual files directly from the `src/main/java` root directory.
63+
For example, to run the Tic-Tac-Toe Low-Level Design file:
64+
```bash
65+
cd src/main/java
66+
javac OOps/LowLevelDesign/TicTacToe.java
67+
java OOps.LowLevelDesign.TicTacToe
68+
```
5069

5170
---
5271

0 commit comments

Comments
 (0)