pylinkedlist

A Python package to work with LinkedList.


Keywords
linked, list, python
License
MIT
Install
pip install pylinkedlist==0.1.0

Documentation

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)