Skip to main content

A circular linked list implementation

Project description


It's a node-oriented circular linked list implementation.



from circulartape import Tape

one = Tape("one")  # one.to_list() == ["one"]
two = one.insert("two")  # one.to_list() == ["one", "two"]
three = two.insert("three")  # one.to_list() == ["one", "two", "three"]

two.remove()  # one.to_list() == ["one", "three"]

# You can build a long list and seek through it n nodes at a time:
one = Tape(1)
current = one
for i in range(2, 100):
    current = current.insert(i)  # => 31

# Use negative values to seek backwards.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for circulartape, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size circulartape-0.0.3-py3-none-any.whl (2.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size circulartape-0.0.3.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page