You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, something seems to be missing? Haven't touched this code in a while. What I think should happen is that the current head's prev pointer should point to the new node, and the new node's next pointer should point to the current head. Then update the head pointer to be the new node. I'm surprised tests haven't caught this.
If you're up for it, can you update the code with the proper functionality and add test(s)?
Also, FYI this repo was moved to the Algorithms repository so the current file to edit would be:
https://github.com/williamfiset/data-structures/blob/068c10624abab4568433f047fd7be3f24fb40d2a/com/williamfiset/datastructures/linkedlist/DoublyLinkedList.java#L80
The text was updated successfully, but these errors were encountered: