We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df5a0c6 commit 238f304Copy full SHA for 238f304
data_structures/linked_list/add_node.py
@@ -1,11 +1,11 @@
1
-class Node: #define a class named node having data and ref as attributes
+class Node:
2
def __init__(self,data:int)->None:
3
self.data=data
4
self.ref= None
5
class LinkedList:
6
- def __init__(self)->None #define head of the linked list i.e initiate the linked list
+ def __init__(self)->None:
7
self.head=None
8
- def print_ll(self): # to print the linked list
+ def print_ll(self):
9
if self.head is None:
10
print("The Linked List is empty ")
11
else:
0 commit comments