A comprehensive collection of algorithms and data structures implementations in Java.
Features • Structure • Quick Start • Testing • Technologies
Algostructs is a complete implementation of fundamental algorithms and data structures, covering everything from basic stacks and linked lists to advanced graph algorithms and string processing techniques. Each implementation is paired with comprehensive unit tests ensuring correctness and reliability.
- Stacks — Array-based and Linked List implementations
- Linked Lists — Circular and Functional (immutable) variants
- Binary Search Trees — Standard BST, AVL balancing, Red-Black Tree conversions
- Hash Tables — Linear probing and separate chaining collision resolution
- Heaps — Min/Max heaps with Priority Queue interface
- Graphs — Directed and Undirected representations with adjacency lists
| Category | Implementations |
|---|---|
| Sorting | Merge Sort, Heap Sort, Union-Find, Closest Pair |
| Searching | Binary Search, BST operations, LRU Cache |
| Strings | Huffman Coding, Rabin-Karp, Incremental Hashing |
| Graphs | DFS, BFS, Dijkstra, Connected Components, Maze Solving |
Algostructs/
├── src/
│ ├── main/java/
│ │ ├── fundamentals/ # Stacks, Linked Lists
│ │ ├── searching/ # BSTs, Hash Tables, Caching
│ │ ├── sorting/ # Sorting algorithms, Heaps
│ │ ├── strings/ # String processing algorithms
│ │ └── graphs/ # Graph algorithms
│ │
│ └── test/java/ # Unit tests (mirrors main/)
│
├── data/ # Test data files
├── libs/ # Local JAR dependencies
└── pom.xml # Maven configuration
| Module | Description |
|---|---|
| Fundamentals | Stack implementations, Circular Linked List, Functional List |
| Searching | BST variants, Hash tables, LRU Cache, Skyline problem |
| Sorting | Merge sort, Heaps, Priority queues, Union-Find, Median finding |
| Strings | Huffman encoding, Rabin-Karp pattern matching, Rolling hash |
| Graphs | Traversals, Shortest paths, Connected components, Flood fill |
- Java 8+
- Maven 3.6+
- Git
# Clone the repository
git clone https://github.com/mathisdelsart/Algostructs.git
cd Algostructs
# Build the project
mvn compile
# Run all tests
mvn testComprehensive test suite with 49 test classes covering all implementations.
# Run all tests
mvn test
# Run tests for a specific module
mvn test -Dtest="searching.*Test"
# Run a specific test class
mvn test -Dtest="BinarySearchTreeTest"- Algorithms, 4th Edition — Reference textbook
This project is developed for academic purposes as part of university coursework.
Built for LINFO1121 - Data Structures and Algorithms @ UCLouvain (Université catholique de Louvain).