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.

Source Distribution

circulartape-0.0.3.tar.gz (1.9 kB view hashes)

Uploaded Source

Built Distribution

circulartape-0.0.3-py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page