Custom Data Structure Library
A custom Java data structure library implementing a generic Queue and HashMap with full iterator support

About This Project
This project involved building a reusable data structure library in Java by implementing a generic Queue and HashMap from scratch, without using Java’s built-in collection classes. The Queue was implemented as a singly linked list following FIFO behavior, while the HashMap used an array of queues to handle collisions through chaining. The library was designed to be generic, allowing it to store different data types, and implemented the iterator design pattern to support forward and reverse traversal. Extensive JUnit tests were written to validate correctness, edge cases, and iterator behavior, ensuring the library could be reliably used by other programs.
Key Features
- Generic singly linked list founcdation
- FIFO Queue implementation
- Custom HashMap with collision handling via chaining
- Forward and reverse iterators
- Support for for-each iteration
- Fully implemented iterator design pattern
- Comprehensive JUnit test coverage
Technologies Used
- IDE: IntelliJ
- Java
- Maven
- JUnit 5
Challenges & Learnings
Challenges:
One challenge was implementing core data structures from scratch without relying on Java’s built-in collections. Designing a generic singly linked list that could support both a queue and a hash map required careful handling of nodes, pointers, and edge cases such as empty lists. Implementing multiple iterators, including reverse iteration, added complexity and required a strong understanding of traversal logic.
What I Learned:
This project strengthened my understanding of how fundamental data structures work internally. I gained experience with generics, inheritance, and the iterator design pattern, as well as collision handling in hash maps using linked lists. Writing unit tests for each method reinforced the importance of correctness and defensive programming when building reusable libraries.