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
var.add(x)
Adding in the front
Add element[s] at the front of linkedlist
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)