Linked List are linear data structures which consists of a data to be linked with another data with the help of a pointer.
Here I have implemented link lists in python.
- LinkedList
- LinkedList.insert(data, pointer): Inserts the item where the pointer points
- LinkedList.push(data): Inserts the item or data at the start of the list
- LinkedList.append(data): Inserts the item or data at the end of the list
- LinkedList.pop(data, pointer=0): Deletes the node in the list where the pointer is pointed. By default deletes the first node in the list
- LinkedList.printList(): Displays the list
- LinkedList.length: Returns the length of the list
- LinkedList.head: Returns the current head or start of the list