Skip to main content

A Python package to work with LinkedList.

Project description

Python-LinkedList

Linkedlist data structure to work with python.

Installation

pip install pylinkedlist

Uninstallation

pip uninstall pylinkedlist

Importing Package

import pylinkedlist as llist

Initializing A LinkedList

Initialize a variable var with Linkedlist data structure.

var = llist.LinkedList()

Adding Element in the LinkedList

Appending at the end

Add element[s] at the end of linkedlist

# x can be a list or single elememnt
var.add(x)

Adding in the front

Add element[s] at the front of linkedlist

# x can be a list or single elememnt
var.addleft(x)

Count of Nodes in the LinkedList

count = var.getcount()

Reference of Node in the LinkedList

count = var.getnode()

Find Middle Element in the LinkedList

count = var.getmid()

Delete A Node From LinkedList

count = var.delete_from_mid(x)

Insert At Mid

var.insert_at_mid(x)

Element at Given Position

element = var.at(x)

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

pylinkedlist-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded source

Built Distribution

pylinkedlist-0.1.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page