Add doubly_to_singly() method to convert a doubly linked list to a singly linked list#14410
Add doubly_to_singly() method to convert a doubly linked list to a singly linked list#14410F-Blaze wants to merge 4 commits into
Conversation
|
Hi maintainers, just a gentle reminder on this PR whenever you get a chance to review it. All checks are passing and I’ve addressed earlier issues. Please let me know if any changes are needed. |
|
Hi maintainers just an another remainder, can you please review the code when you are free. Thank you |
|
Hi maintainers, I just wanted to know if any changes or updates that are required for this pull request. Thank you |
|
I was just wondering if there is anything wrong with my pull request cause it has not been reviewed for at least a month. |
| @@ -1,3 +1,5 @@ | |||
| from data_structures.linked_list import singly_linked_list | |||
There was a problem hiding this comment.
Consider importing only the required class (e.g., from ... import Node) instead of the full module to improve readability and reduce repeated singly_linked_list.Node usage.
There was a problem hiding this comment.
Thanks for the suggestion, I’ve updated the import to use SinglyNode directly and refactored the code accordingly.
Describe your change:
This pull request adds a new method
doubly_to_singly()to theDoublyLinkedListclass.The method converts a doubly linked list into a singly linked list by creating a new singly linked list and copying the data from each node.
The implementation includes:
test_doubly_linked_list()Checklist: