Socket
Book a DemoInstallSign in
Socket

DoubleLinkedList

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

DoubleLinkedList

This package is double linked list

1.0.4
pipPyPI
Maintainers
1

Double Linked List 1.0.4

Table of Contents

  • Installation
  • How to use

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()

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.