Want to add Sorted Linked List to Data Structires
Feature description
I want to add sorted linked list to the repo under data structures. I have opened a pull request #11607 Please review
@mjk22071998 Is this issue completed? If not I would like to add it. Please respond.
Yes this is complete
please assign this issue to me if it is in open. please respond to this message it will help me an long way in my professional devolopment
I do not have permissions to assign this issue to anyone
I do not have permissions to assign this issue to anyone
so whom should i ask for assignation ..
Whoever is maintaining the repo
Can I try this can you give me this opportunity I want it
class Node: def init(self, data): self.data = data self.next = None
class SortedLinkedList: def init(self): self.head = None
def insert(self, data):
if not self.head or data < self.head.data:
new_node = Node(data)
new_node.next = self.head
self.head = new_node
else:
current = self.head
while current.next and data > current.next.data:
current = current.next
new_node = Node(data)
new_node.next = current.next
current.next = new_node
def print_list(self):
current = self.head
while current:
print(current.data, end=" ")
current = current.next
print()
Guys Guys Guys calm down, I opened the issue after I opened a pull request you can see #11607. The purpose of opening the issue is to get attention of maintainers to review the pull request