Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUGGESTION #150

Open
MdialloC19 opened this issue Dec 16, 2023 · 0 comments · May be fixed by #153
Open

SUGGESTION #150

MdialloC19 opened this issue Dec 16, 2023 · 0 comments · May be fixed by #153

Comments

@MdialloC19
Copy link

Suggestion : we can implement a method for inserting or pushing node at specific index
###Description

In our current linked list implementation, we lack a method to insert or push a node at a specific index within the linked list structure. The addition of such a method would significantly enhance the flexibility and functionality of our linked list.

Proposed Method

The suggested method, tentatively named insertAtIndex(data, index), will take two parameters:

  • data: The data to be stored in the new node.
  • index: The index at which the node containing the provided data will be inserted.
    This method will handle the insertion of a new node at the specified index, considering edge cases such as insertion at the beginning, end, or any position within the linked list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant