This package is double linked list
Project description
Double Linked List 1.0.4
Table of Contents
Installation
pip install DoubleLinkedList .
How to use
- Add to your code: from DoubleLinkedList import DLinked
- Create double linked list in this way name_of_your_list = DLinked.Linked()
- In order to insert element in the beginning use .pushfront(element)
- In order to insert element in the end use .pushback(element)
- In order to delete element from the beginning use .popfront()
- In order to delete element from the end use .popback()
- In order to insert in any place you want use .insert(element, index_of_element)
- In order to delete element which you want use .delete(index_of_element)
- In order to get certain element use .get(index_of_element)
- In order to find certain element use .find(element).
If it was found, you will get index of element. Else you will get 0 - In order to invert list from certain position to last position use .inversion(index_of_element)
- In order to print the whole list use .dlprintf()
- In order to print the whole list in reverse use .dlprintb()
- In order to print certain data use .dlprint(element)
Example
from DoubleLinkedList import DLinked
dll = DLinked.Linked()
dll.pusback(2)
dll.pushfront(1)
dll.insert(3, 2)
dll.find(2)
dll.get(3)
dll.dlprintf()
dll.dlprintb()
dll.inversion(1)
dll.delete(2)
dll.popfront()
dll.popback()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file DoubleLinkedList-1.0.4.tar.gz
.
File metadata
- Download URL: DoubleLinkedList-1.0.4.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3503641339c353fb4d1ed358dd50d2a065c04f86b7f4dfdcfa3f5be9791e4da8 |
|
MD5 | 6a764f4bd6686a4498f76d13e6eab078 |
|
BLAKE2b-256 | d00966d7d866b3b8dabbcad8984d85e45a72e3b35a1d766ca847876526ca4628 |
File details
Details for the file DoubleLinkedList-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: DoubleLinkedList-1.0.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a705b2b2520839363b9b29239147bcbb81ea18e4fa2ae93abca6c2de74e9abab |
|
MD5 | b2180eb38a41c2c0b8b4a478e314ae98 |
|
BLAKE2b-256 | dd94722997450224a39c2391cfe3ef9b7050187167f79cc512f360d86f9d1fb2 |