* added an algorithm which checks a linked list for loops and returns true if one is found
* added doctests and clarified meaning of loop
* Define Node.__iter__()
* Update and rename has_loop.py to has_duplicate_data.py
* Update has_duplicate_data.py
* Update has_duplicate_data.py
* Update and rename has_duplicate_data.py to has_loop.py
* Update has_loop.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix doubly linked list algorithm
* Fix bug with insert_at_tail method
Create __str__() method for Node class and LinkedList class
* Simplify __str__() of LinkedList
Returns empty string if there are no elements in the list
* Fix description
* Update __init__.py
please add a function to get length of linked list
* Update __init__.py
* Update doubly_linked_list.py
all size function lo doubly linked list class
* prime number _better method
* comments
* Updated init.py 2
made it more pythonic
* updated length function
* commnet in linked_list construtor
* Update data_structures/linked_list/__init__.py
accepecting changes
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/linked_list/__init__.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update __init__.py
* Revert changes to doubly_linked_list.py
* Revert changes to prime_check.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Precision must be a nonnegative integer
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added __len__ function
Added a function to count number of nodes in linked list
* Updated __len__ method
used snake_case instead of camel case
* Add tests to __len__()
Co-authored-by: Christian Clauss <cclauss@me.com>
* spelling corrections
* review
* improved documentation, removed redundant variables, added testing
* added type hint
* camel case to snake case
* spelling fix
* review
* python --> Python # it is a brand name, not a snake
* explicit cast to int
* spaces in int list
* "!= None" to "is not None"
* Update comb_sort.py
* various spelling corrections in documentation & several variables naming conventions fix
* + char in file name
* import dependency - bug fix
Co-authored-by: John Law <johnlaw.po@gmail.com>
* enhance swapping code in link
* heapify do not recursive
* fix
* fix identifier and add test
* typing.Any and LinkedList instead of Linkedlist
* typing.Any and LinkedList instead of Linkedlist
* Update singly_linked_list.py
printing current.data rather than node address in __repr__ for a more readable print statement
* eval(repr(c)) == c
The output of `__repr__()` _should look like a valid Python expression that could be used to recreate an object with the same value_.
https://docs.python.org/3.4/reference/datamodel.html#object.__repr__
* += --> +
* Adds, append, len, print operations for circular linked list
* Adds, prepend support
* Adds, delete from front of the list
* Adds, delete_rear support
* Adds, method documentations
* Adds, type checking and doctests
* Updates doctest for delete ops
* Addressing requested changes
* Removes unused import
* Fixes failing doctests
* Minor modifications...
* Improved Singly Linked List
Added String Representations of Nodes and Linked Lists
Added support for indexing and changing of Node data using indices.
* Added a few comments to Linked Lists
* Reformatted to conform to PEP8
* Added from_sequence.py
Convert a Python List to Linked List comprising of Nodes and return head.
* Added print_reverse.py
Recursive program to print the elements of a Linked List in reverse.
* Change 'is not None' for more Pythonicness