AIBauchi / PyDS-A

PyDS-A: Python Data Structures and Algorithms Library - Your go-to resource for essential data structures and algorithms, implemented in Python. Improve your coding skills and optimize your programs with this comprehensive collection.
MIT License
8 stars 12 forks source link

Implement Singular Linked List #50

Closed Racso-3141 closed 12 months ago

Racso-3141 commented 1 year ago

Implement Singly Linked List

Description

I implement SinglyLinkedList class in singly_linked_list.py. The SinglyLinkedList has head, tail, and size, so adding and deleting node at start and end and retrieving size can be achieved in constant time. I implement delete_first, delete_all, find_first, find_all to replace search and delete. What's more, clear, display ,and get_list work the same with them in LinkedList.

Related Issue

Closes: #33

Testing

python3 -m doctest -v singly_linked_list.py and pass all tests.

Author

Enxu Han (@Racso-3141 )

Tinny-Robot commented 12 months ago

Enxu Han (@Racso-3141),

Thank you for your contribution! Please remember to star the repository. Enjoy the rest of Hacktoberfest, and happy hacking