Skip to main content

This package is double linked list

Project description

Double Linked List 1.0.4

Table of Contents

  1. Installation
  2. How to use

Installation

pip install DoubleLinkedList .

How to use

  1. Add to your code: from DoubleLinkedList import DLinked
  2. Create double linked list in this way name_of_your_list = DLinked.Linked()
  3. In order to insert element in the beginning use .pushfront(element)
  4. In order to insert element in the end use .pushback(element)
  5. In order to delete element from the beginning use .popfront()
  6. In order to delete element from the end use .popback()
  7. In order to insert in any place you want use .insert(element, index_of_element)
  8. In order to delete element which you want use .delete(index_of_element)
  9. In order to get certain element use .get(index_of_element)
  10. In order to find certain element use .find(element).
    If it was found, you will get index of element. Else you will get 0
  11. In order to invert list from certain position to last position use .inversion(index_of_element)
  12. In order to print the whole list use .dlprintf()
  13. In order to print the whole list in reverse use .dlprintb()
  14. 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)

Uploaded Source

Built Distribution

DoubleLinkedList-1.0.4-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page