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.
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.
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 )