Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. from __future__ import *
  2. from typing import Any
  3. import time
  4.  
  5. class LinkedList:
  6. """
  7. Linked List class has a reference to the first node
  8. === Attribute ===
  9. _first: reference to the first node
  10. """
  11. def __init__(self) -> None:
  12. self._first = None
  13.  
  14. class Node:
  15. """
  16. A node class which stores value inside.
  17. === Attributes ===
  18. _value: value stored in this node
  19. _next: reference to the next node
  20. """
  21. def __init__(self, value: Any) -> None:
  22. self._value = value
  23. self._next = None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement