Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import *
- from typing import Any
- import time
- class LinkedList:
- """
- Linked List class has a reference to the first node
- === Attribute ===
- _first: reference to the first node
- """
- def __init__(self) -> None:
- self._first = None
- class Node:
- """
- A node class which stores value inside.
- === Attributes ===
- _value: value stored in this node
- _next: reference to the next node
- """
- def __init__(self, value: Any) -> None:
- self._value = value
- self._next = None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement