A circular linked list implementation
Project description
circulartape
It's a node-oriented circular linked list implementation.
Source: phab.tris.fyi.
Example
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)
one.seek(30).data # => 31
# Use negative values to seek backwards.
Project details
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file circulartape-0.0.3.tar.gz
.
File metadata
- Download URL: circulartape-0.0.3.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
39349fb1c6fc400d605d4f097a7bf86f4954bbe4a92edc622f4dbe45a856ee73
|
|
MD5 |
d41981d1b1d760b3bf00ac474aa348bf
|
|
BLAKE2b-256 |
671b1ab734cf649d56caa5ac164f9eb0eb07a146001fec403f6a86a3b8b4dc03
|
File details
Details for the file circulartape-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: circulartape-0.0.3-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
8ebfacc8fdc537edea9c5908dfbb9498623dd27cdf1f8d7c268f9b68dadc427e
|
|
MD5 |
d92d83d4f578147684c7400aa7b51201
|
|
BLAKE2b-256 |
d3e1ebf860d54304681527128d7b299d642ff23e58608fd0540e7a4ac8dac78e
|