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
DoubleLinkedList-1.0.4.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for DoubleLinkedList-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a705b2b2520839363b9b29239147bcbb81ea18e4fa2ae93abca6c2de74e9abab |
|
MD5 | b2180eb38a41c2c0b8b4a478e314ae98 |
|
BLAKE2b-256 | dd94722997450224a39c2391cfe3ef9b7050187167f79cc512f360d86f9d1fb2 |