Skip to content

A high-quality, header-only C++17 library delivering efficient, type-safe, and extensible implementations of singly, doubly, and circular linked lists. Designed for reliability and ease of integration in both educational and production environments, with a modern API and strong exception safety guarantees.

Notifications You must be signed in to change notification settings

Abhishek-Atole/Generalised-Data-Structures-Library-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generalised Data Structures Library Logo

Generalised Data Structures Library

A modern, extensible, and type-safe C++ library for linked list data structures

Build Status License C++17


📽️ Demo

Generalised Data Structures Library Demo

Demo Video


🚀 Overview

The Generalised Data Structures Library is a header-only, modern C++ library providing robust, reusable, and efficient implementations of linked list data structures.
It is designed for both educational and production use, with a focus on type safety, exception safety, and extensibility.


✨ Features

  • Singly Linked List (SinglyLinkedList<T>)
  • Doubly Linked List (DoublyLinkedList<T>)
  • Singly Circular Linked List (SinglyCircularList<T>)
  • Doubly Circular Linked List (DoublyCircularList<T>)
  • Fully templated and type-safe
  • Exception-safe operations
  • Consistent, intuitive API
  • Header-only: easy integration
  • Well-documented and tested
  • Modern C++17 codebase

📂 Directory Structure

include/
  DataStructures.hpp
  SinglyLinkedList.hpp
  DoublyLinkedList.hpp
  SinglyCircularList.hpp
  DoublyCircularList.hpp
src/
  main.cpp
tests/
  test_linkedlists.cpp
docs/
  logo.png
  demo.gif
CMakeLists.txt
README.md
.gitignore
LICENSE

🛠️ Installation

Prerequisites

  • C++17 compatible compiler (e.g., GCC 7+, Clang 5+, MSVC 2017+)
  • CMake 3.10 or newer

Build Instructions

git clone https://github.com/yourusername/Generalised-Data-Structures-Library-.git
cd Generalised-Data-Structures-Library-
mkdir build && cd build
cmake ..
make
./main

📦 Usage Example

#include "DataStructures.hpp"
using namespace gds;

int main() {
    SinglyLinkedList<int> sll;
    sll.insertFirst(10);
    sll.insertLast(20);
    sll.display();

    DoublyLinkedList<char> dll;
    dll.insertFirst('A');
    dll.insertLast('B');
    dll.display();

    SinglyCircularList<int> scl;
    scl.insertFirst(1);
    scl.insertLast(2);
    scl.display();

    DoublyCircularList<char> dcl;
    dcl.insertFirst('X');
    dcl.insertLast('Y');
    dcl.display();

    return 0;
}

📖 API Documentation

All list types support:

Method Description
insertFirst(const T& value) Insert at the beginning
insertLast(const T& value) Insert at the end
insertAtPos(const T& value, size_t p) Insert at position (1-based)
deleteFirst() Remove the first element
deleteLast() Remove the last element
deleteAtPos(size_t pos) Remove element at position
display(std::ostream& os = std::cout) Print the list to the output stream
size() const Get the number of elements

All operations throw std::out_of_range on invalid positions or empty lists.


🧪 Testing

Unit tests are located in the tests/ directory.
To run tests (if provided):

cd build
ctest

🤝 Contributing

Contributions are welcome! Please open issues or pull requests for improvements, bug fixes, or new features.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a pull request

📄 License

This project is licensed under the MIT License.


🙋‍♂️ Contact

Maintainer: Abhishek Atole
For questions or support, please open an issue or contact via GitHub.


Logo

About

A high-quality, header-only C++17 library delivering efficient, type-safe, and extensible implementations of singly, doubly, and circular linked lists. Designed for reliability and ease of integration in both educational and production environments, with a modern API and strong exception safety guarantees.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published