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

addAt function in linked-list #82

Closed
TheSTL opened this issue Oct 13, 2019 · 5 comments
Closed

addAt function in linked-list #82

TheSTL opened this issue Oct 13, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@TheSTL
Copy link
Member

TheSTL commented Oct 13, 2019

Linked-list addAt function not working properly.
File location linked-list

Please go through the Contribution Guide here https://github.com/knaxus/problem-solving-javascript#contribution-guide before going forward with this issue.

Thanks

@TheSTL TheSTL added bug Something isn't working Hacktoberfest labels Oct 13, 2019
@fluffynuts
Copy link

This appears to be working correctly in master (there's a passing test too). What's the issue?

@TheSTL
Copy link
Member Author

TheSTL commented Oct 13, 2019

@fluffynuts

  • Case 1:
    linkedList.addAt(0, 1);
    linkedList.addAt(0 ,2);
    output : { data: 1, next: Node { data: 2, next: null } }
  • Case 2:
    linkedList.addAt(0, 1);
    linkedList.addAt(0 ,2);
    linkedList.addAt(2 ,3);
    output: { data: 1, next: Node { data: 3, next: null } }

There can be more cases where it can fail

@ashu8912
Copy link

Hey Can I take this issue.

@ashokdey
Copy link
Member

ok

@ashu8912
Copy link

#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants