This week, I focused on refactoring my linked list implementation from a singly linked list to a doubly linked list for my assignment.
Initially, I only had the next pointer to connect nodes in one direction. The goal was to introduce a prev pointer in my SeLinkedList class to make it easier to traverse the list backward and remove nodes efficiently. At first, it seemed simple, but I quickly realized that updating both pointers (next and prev) consistently was trickier than expected.
I ran into several issues where removing or inserting nodes caused broken links or skipped elements. The way I solved it was through persistent debugging, lots of trial and error, and printing out pointer states at every step until everything linked correctly. This experience taught me that in a doubly linked list, every update must happen symmetrically.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)