This project demonstrates a variety of classic Data Structures and Algorithms implemented in Java. It includes exercises and implementations for Binary Search Trees, Graph Algorithms (Dijkstra, Euler Cycle, Traversal), Linked Lists, Queues, and more.
- Java Development Kit (JDK) 8 or higher
- (Optional) An IDE like IntelliJ IDEA, Eclipse, or VS Code for easier code navigation
- Clone the repository (if not already downloaded):
git clone <repository-url> cd Data-Structures-and-Algorithms-main
- Compile the source code:
Each exercise/module contains its own
srcdirectory with Java files. For example, to compile the Binary Search Tree exercise inBSTree-Exercise/Person:This will compile the Java files in thecd BSTree-Exercise/Person javac -d bin src/*.java
srcdirectory and place the.classfiles in thebindirectory (createbinif it does not exist).
After compiling, run the main class for the desired module. For example, to run the BSTree-Exercise/Person module:
cd BSTree-Exercise/Person
java -cp bin MainRepeat similar steps for other modules (e.g., DijkstraGraph-Exercise, EulerCycle-Exercise, etc.).
Data-Structures-and-Algorithms-main/
├── BSTree-Exercise/
│ ├── bal/
│ ├── BSTree1/
│ ├── Delete-By-Copy/
│ ├── Person/
│ └── Rotate/
├── DijkstraGraph-Exercise/
├── DoubleLinkedList-Exercise/
├── EulerCycle-Exercise/
├── LinkedList-Exercise/
├── Queue/
├── TraversalGraph-Exercise/
├── README.md
└── ... (project and build configuration files)
- Each main folder contains:
src/: Java source code for the specific data structure or algorithm.bin/: (You may create this) Compiled.classfiles after building.nbproject/,build.xml,manifest.mf: Project and build configuration files (for NetBeans or similar IDEs).
- Java Documentation
- How to Compile and Run Java
- For questions or contributions, please open an issue or pull request.