Skip to content

Fix linked-list bugs #5

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bkline
Copy link

@bkline bkline commented Jan 20, 2025

In section 17, session 10:

  • insertLast() crashed if the list was empty
  • getAt() kept going after finding the requested node
  • removeAt() crashed if index equaled the number of nodes
  • printListData() added a trailing space separator

I'm lumping multiple bugs into the same PR because there doesn't appear to be a way to file bug reports, to which I would have linked separate commits/PRs. I'm also ignoring the fact that getAt() doesn't do what its name says it will do.

Not all of the bugs were worth a PR, but with the two crashing bugs, I figured I might as well fix even the minor bugs while I had the code on the bench. 😉

In section 17, session 10:
- insertLast() crashed if the list was empty
- getAt() kept going after finding the requested node
- removeAt() crashed if the argument equaled the number of nodes
- printListData() added a trailing space separator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant