Linked List

Linked List

Introduction The linked list is a linear data structure. There are two types of linked lists, the singly linked list and the doubly linked list. Singly Linked list The linked list elements are not stored at a contiguous location; the elements are linked using pointers. Advantages over arrays Dynamic size Ease of insertion/deletion (Need to move all elements after targeted element in array) Implementation class Node(object): def __init__(self, val): self.