Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Instruction

Singly and Doubly Linked Lists

Python

Singly Linked List

class Node:
    """
    An object for storing a single node in a linked list

    Attributes:
        data: Data stored in node
        next_node: Reference to next node in linked list
    """

    def __init__(self, data, next_node = None):
        self.data = data
        self.next_node = next_node

    def __repr__(self):
        return "<Node data: %s>" % self.data

class...