swarajmhatre / Generic_STL_Project

0 stars 2 forks source link
cpp data-structures generic-programming hacktoberfest

Linked List Operations

This C++ project demonstrates various operations on different types of linked lists, including Singly Linear, Singly Circular, Doubly Linear, and Doubly Circular Linked Lists. The project is structured using classes and templates for flexibility.

Linked List Classes

1. NodeG Class

2. LinkedList Class (Abstract Base Class)

3. DoublyCL Class

4. DoublyLL Class

5. SinglyCL Class

6. SinglyLL Class

Sample Usage

The main function provides examples of using each type of linked list. It demonstrates creating instances, inserting elements, deleting elements, and displaying the contents of the linked lists.

int main()
{
    // Examples of using Doubly Circular Linked List
    DoublyCL<int> dcobj;
    dcobj.InsertFirst(51);
    dcobj.InsertFirst(21);
    dcobj.InsertFirst(11);
    dcobj.Display();

    // ... (continue with various operations)

    // Examples of using Singly Linear Linked List
    SinglyLL<int> slobj;
    slobj.InsertFirst(51);
    slobj.InsertFirst(21);
    slobj.InsertFirst(11);
    slobj.Display();

    // ... (continue with various operations)

    return 0;
}

Contribution

Feel free to contribute to this project by extending or improving the existing functionality of linked list operations. If you have ideas for additional features or optimizations, your contributions are welcome.

Author

This project was created by Swaraj Mhatre.