This project implements a doubly linked list of integers in C++.
It supports insertion, deletion, searching, and string conversion, while maintaining elements in sorted order.
- Insert at head and tail
- Insert in sorted order
- Delete from head and tail
- Delete a specific node
- Search for a value
- Convert list to a string
- Print all elements
- Proper memory management (constructor & destructor)
The project uses the Catch2 testing framework to verify functionality.
Example tests:
- Insert elements and check order
- Delete head, tail, and specific nodes
- Validate string representation of the list
├── intDList.hpp # Header file for doubly linked list class
├── intDList.cpp # Implementation of the list
├── intDList_test.cpp # Unit tests using Catch2
├── IntDList_node.hpp # Node class definition
├── catch.hpp # Catch2 single-header test framework
g++ -std=c++11 intDList.cpp intDList_test.cpp -o test
./test🖥️ Sample output
All tests passed (5 assertions in 1 test case)
🎯 Learning Outcomes
- Gained hands-on experience with pointers and dynamic memory management in C++
- Practiced data structures implementation (doubly linked list)
- Applied unit testing using Catch2
- Organized project with headers, implementations, and tests
📜 Authors
Daud Ahmad Nisar
Computer Science Student at the University of South Florida