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

Update Linked List classes #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Update Linked List classes #33

wants to merge 4 commits into from

Conversation

phrdang
Copy link
Member

@phrdang phrdang commented Jul 1, 2021

Location

  • Ch. 16.6 Practice

Changes

  • Update and rename LinkedList.java
    • Rename to TestLinkedList.java
    • Add driver class to test methods
    • Update practice problem instructions to be more specific and include driver class
    • Add insert, clear methods
    • Update misc docstrings for clarity
    • Update toString() method to handle empty lists properly
  • Delete SinglyLinkedList.java (both practice and solution files)
    • This is a duplicate version of LinkedList.java, but it's implemented and documented more poorly
  • Rename the new LinkedList class into SinglyLinkedList to keep consistency with terminology in the curriculum

Notes

  • Please don't forget to update the instructions for both LinkedList and SinglyLinkedList on Notion!

TODO

  • More methods for the SinglyLinkedList class (e.g. get, set, indexOf)
    • Should we change the method names so that they're closer to the naming of the built-in LinkedList?
  • Should we simplify the Node class so that next and value are public? That way you don't have to do the awkward next() and value().
  • Add doubly linked list practice problem template and solution
  • Add circular linked list practice problem template and solution

phrdang added 2 commits July 1, 2021 15:39
- Rename to TestLinkedList.java
- Add driver class to test methods
- Update practice problem instructions to be more specific and include driver class
- Add insert, clear methods
- Update misc docstrings for clarity
- Update toString() method to handle empty lists properly
This is a duplicate  version of LinkedList.java and is implemented and
documented more poorly
@phrdang
Copy link
Member Author

phrdang commented Jul 2, 2021

You may want to hold off on merging this PR until Ch. 16 is done being updated. It's a bit all over the place right now in terms of the linked list methods and explanations.

This is to stay consistent with the curriculum,
since the built-in LinkedList is a doubly linked list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants