Skip to content

Want to add Sorted Linked List to Data Structires #11768

Closed

Description

@mjk22071998

Feature description

I want to add sorted linked list to the repo under data structures. I have opened a pull request #11607 Please review

Activity

  1. AnuragSingh0000 commented on Oct 5, 2024

    @AnuragSingh0000

    @mjk22071998 Is this issue completed? If not I would like to add it. Please respond.

  2. mjk22071998 commented on Oct 5, 2024

    @mjk22071998
    Author

    Yes this is complete

  3. changed the title [-]Want to add sorted Linked List to Data Structires[/-] [+]Want to add Sorted Linked List to Data Structires[/+] on Oct 6, 2024
  4. roshankraveendrababu commented on Oct 6, 2024

    @roshankraveendrababu

    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

  5. mjk22071998 commented on Oct 6, 2024

    @mjk22071998
    Author

    I do not have permissions to assign this issue to anyone

  6. roshankraveendrababu commented on Oct 6, 2024

    @roshankraveendrababu

    I do not have permissions to assign this issue to anyone

    so whom should i ask for assignation ..

  7. mjk22071998 commented on Oct 6, 2024

    @mjk22071998
    Author

    Whoever is maintaining the repo

  8. onhgomat commented on Oct 7, 2024

    @onhgomat

    Can I try this can you give me this opportunity I want it

  9. onhgomat commented on Oct 7, 2024

    @onhgomat

    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()
    
  10. mjk22071998 commented on Oct 7, 2024

    @mjk22071998
    Author

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions