Skip to content

Commit 34da76f

Browse files
authored
Update stack_with_doubly_linked_list.py
1 parent 1e71b72 commit 34da76f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

data_structures/stacks/stack_with_doubly_linked_list.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@
33

44
from __future__ import annotations
55

6-
from typing import Generic, TypeVar
76

8-
T = TypeVar("T")
9-
10-
11-
class Node(Generic[T]):
7+
class Node[T]:
128
def __init__(self, data: T):
139
self.data = data # Assign data
1410
self.next: Node[T] | None = None # Initialize next as null
1511
self.prev: Node[T] | None = None # Initialize prev as null
1612

1713

18-
class Stack(Generic[T]):
14+
class Stack[T]:
1915
"""
2016
>>> stack = Stack()
2117
>>> stack.is_empty()

0 commit comments

Comments
 (0)