linkedlistx


Namelinkedlistx JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA Python package implementing singly, doubly, circular singly, and circular doubly linked lists.
upload_time2025-08-03 21:25:13
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords linked list data structures python sll dll cll dcll
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # linkedlistx

A Python package that provides implementations of **four types of linked lists**:

- ✅ Singly Linked List (SLL)
- ✅ Doubly Linked List (DLL)
- ✅ Circular Singly Linked List (CLL)
- ✅ Circular Doubly Linked List (DCLL)

This library is great for learning, teaching, or using classical linked list data structures in any Python project.

---

## 🧠 Features

- Insert at beginning or end
- Insert at a specific position (`append`)
- Delete by index or value
- Reverse the list
- Find elements by value
- Generate auto-filled lists (`generate(n)`)
- View list length or value at a position
- Iterable linked lists (`for node in list:`)

Each list type preserves its structural characteristics (circularity, bidirectionality, etc.)

---

## 📁 Project Structure

linkedlistx/
├── CLL.py # Circular Singly Linked List
├── DLL.py # Doubly Linked List
├── DCLL.py # Circular Doubly Linked List
├── SLL.py # Singly Linked List
├── node.py # Node classes
├── init.py # Unified imports

from linkedlistx import SingleLinkedList

sll = SingleLinkedList()
sll.insert_at_beginning(10)
sll.insert_at_end(20)
sll.display()  # Output: 10-> 20-> None

--------
from linkedlistx import DoubleLinkedList

dll = DoubleLinkedList()
dll.generate(5)
dll.reverse()
dll.display()  # Output: 5-> 4-> 3-> 2-> 1-> None

--------

from linkedlistx import CircularDoubleLinkedList

dcll = CircularDoubleLinkedList()
dcll.insert_at_beginning(5)
dcll.insert_at_end(15)
dcll.display()

✅ Common to All Lists
Method	Description
insert_at_beginning(data)	Insert node at head
insert_at_end(data)	Insert node at tail
append(data, pos)	Insert at specified position
delete(pos)	Delete node at position
remove(data)	Delete first node with value
update(pos, data)	Update value at position
show_val(pos)	Print value at position
show_len()	Print number of nodes
find(data)	Print index of data or error
generate(n)	Auto-fill list with 1 to n
del_at_start()	Delete first node
del_at_end()	Delete last node
reverse()	Reverse the list
display()	Print node values
__iter__()	Make list iterable

🔩 Node Structure
# SLL Node
class SLLNode:
    def __init__(self, data):
        self.data = data
        self.next = None

# DLL Node
class DLLNode:
    def __init__(self, data):
        self.data = data
        self.prev = None
        self.next = None

🪪 License
This project is licensed under the MIT License.

🤝 Contributing
Contributions are welcome!
Feel free to open issues or pull requests to enhance functionality, fix bugs, or suggest new features.

👤 Author
Developed by Aswath 🫡
GitHub: https://github.com/aswath-maker

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "linkedlistx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "linked list, data structures, python, sll, dll, cll, dcll",
    "author": null,
    "author_email": "Aswath <aswathnag.s@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/aa/8a/3d1c2bb3ac13dd4c9ccc8240a73d2765fe930733ab0e05def258500ee2ff/linkedlistx-0.1.0.tar.gz",
    "platform": null,
    "description": "# linkedlistx\r\n\r\nA Python package that provides implementations of **four types of linked lists**:\r\n\r\n- \u2705 Singly Linked List (SLL)\r\n- \u2705 Doubly Linked List (DLL)\r\n- \u2705 Circular Singly Linked List (CLL)\r\n- \u2705 Circular Doubly Linked List (DCLL)\r\n\r\nThis library is great for learning, teaching, or using classical linked list data structures in any Python project.\r\n\r\n---\r\n\r\n## \ud83e\udde0 Features\r\n\r\n- Insert at beginning or end\r\n- Insert at a specific position (`append`)\r\n- Delete by index or value\r\n- Reverse the list\r\n- Find elements by value\r\n- Generate auto-filled lists (`generate(n)`)\r\n- View list length or value at a position\r\n- Iterable linked lists (`for node in list:`)\r\n\r\nEach list type preserves its structural characteristics (circularity, bidirectionality, etc.)\r\n\r\n---\r\n\r\n## \ud83d\udcc1 Project Structure\r\n\r\nlinkedlistx/\r\n\u251c\u2500\u2500 CLL.py # Circular Singly Linked List\r\n\u251c\u2500\u2500 DLL.py # Doubly Linked List\r\n\u251c\u2500\u2500 DCLL.py # Circular Doubly Linked List\r\n\u251c\u2500\u2500 SLL.py # Singly Linked List\r\n\u251c\u2500\u2500 node.py # Node classes\r\n\u251c\u2500\u2500 init.py # Unified imports\r\n\r\nfrom linkedlistx import SingleLinkedList\r\n\r\nsll = SingleLinkedList()\r\nsll.insert_at_beginning(10)\r\nsll.insert_at_end(20)\r\nsll.display()  # Output: 10-> 20-> None\r\n\r\n--------\r\nfrom linkedlistx import DoubleLinkedList\r\n\r\ndll = DoubleLinkedList()\r\ndll.generate(5)\r\ndll.reverse()\r\ndll.display()  # Output: 5-> 4-> 3-> 2-> 1-> None\r\n\r\n--------\r\n\r\nfrom linkedlistx import CircularDoubleLinkedList\r\n\r\ndcll = CircularDoubleLinkedList()\r\ndcll.insert_at_beginning(5)\r\ndcll.insert_at_end(15)\r\ndcll.display()\r\n\r\n\u2705 Common to All Lists\r\nMethod\tDescription\r\ninsert_at_beginning(data)\tInsert node at head\r\ninsert_at_end(data)\tInsert node at tail\r\nappend(data, pos)\tInsert at specified position\r\ndelete(pos)\tDelete node at position\r\nremove(data)\tDelete first node with value\r\nupdate(pos, data)\tUpdate value at position\r\nshow_val(pos)\tPrint value at position\r\nshow_len()\tPrint number of nodes\r\nfind(data)\tPrint index of data or error\r\ngenerate(n)\tAuto-fill list with 1 to n\r\ndel_at_start()\tDelete first node\r\ndel_at_end()\tDelete last node\r\nreverse()\tReverse the list\r\ndisplay()\tPrint node values\r\n__iter__()\tMake list iterable\r\n\r\n\ud83d\udd29 Node Structure\r\n# SLL Node\r\nclass SLLNode:\r\n    def __init__(self, data):\r\n        self.data = data\r\n        self.next = None\r\n\r\n# DLL Node\r\nclass DLLNode:\r\n    def __init__(self, data):\r\n        self.data = data\r\n        self.prev = None\r\n        self.next = None\r\n\r\n\ud83e\udeaa License\r\nThis project is licensed under the MIT License.\r\n\r\n\ud83e\udd1d Contributing\r\nContributions are welcome!\r\nFeel free to open issues or pull requests to enhance functionality, fix bugs, or suggest new features.\r\n\r\n\ud83d\udc64 Author\r\nDeveloped by Aswath \ud83e\udee1\r\nGitHub: https://github.com/aswath-maker\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package implementing singly, doubly, circular singly, and circular doubly linked lists.",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "linked list",
        " data structures",
        " python",
        " sll",
        " dll",
        " cll",
        " dcll"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "38b22886d1fcfce91f253322a3f8c0d76882f7db564dfc91ea9b834640cf88cb",
                "md5": "ac7d32dfbd998e91a2c290112602fe41",
                "sha256": "a0c6d7756a75e266ae1a2c0f1f8868ad69ad210b00c1b82a3c12526c76f9472b"
            },
            "downloads": -1,
            "filename": "linkedlistx-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac7d32dfbd998e91a2c290112602fe41",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8424,
            "upload_time": "2025-08-03T21:25:12",
            "upload_time_iso_8601": "2025-08-03T21:25:12.684099Z",
            "url": "https://files.pythonhosted.org/packages/38/b2/2886d1fcfce91f253322a3f8c0d76882f7db564dfc91ea9b834640cf88cb/linkedlistx-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aa8a3d1c2bb3ac13dd4c9ccc8240a73d2765fe930733ab0e05def258500ee2ff",
                "md5": "d7c1cd8ff82d5611fc90a3bf809a4a51",
                "sha256": "cfa2149d2716435efd435648f384e39a453d61511811877ea0d65109adf7d75a"
            },
            "downloads": -1,
            "filename": "linkedlistx-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d7c1cd8ff82d5611fc90a3bf809a4a51",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7348,
            "upload_time": "2025-08-03T21:25:13",
            "upload_time_iso_8601": "2025-08-03T21:25:13.824261Z",
            "url": "https://files.pythonhosted.org/packages/aa/8a/3d1c2bb3ac13dd4c9ccc8240a73d2765fe930733ab0e05def258500ee2ff/linkedlistx-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-03 21:25:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "linkedlistx"
}
        
Elapsed time: 1.78253s