Simple implementation of data structures for python
Project description
fds
Simple implementaion of data structures (DS) for python
Content
- linked list
- stack
- queue
Classes
- List // linked list
- Stack // stack
- Queue // queue
API
List
- insert(self, data, pos=0) // TODO: add node in the entered position (pos=0 => add in the begining)
- append(self, data) // TODO: add node in the end
- delete(self, data) // TODO: delete all nodes hav the entered data
- remove(self, pos=0) // TODO: return and remove node in the entered position (pos=0 => remove first node, pos=-1 => remove last node)
- first(self) // TODO: return the data in the first node
- last(self) // TODO: return the data in the last node
Stack
- push(self, data) // TODO: add a node to the top
- pop(self) // TODO: return and remove the node in the top
- top(self) // TODO: return the data in the first node
Queue
- enqueue(self, data) // TODO: add a node to the end
- dequeue(self) // TODO: return and remove the first element
- front(self) // TODO: return the data in the first node
- back(self) // TODO: return the data in the last node
API for all structures
- repr(self) // USE: print([DS_name]) // TODO: display the DS
- len(self) // USE: len([DS_name]) // TODO: return the lenth of the DS
- empty(self) // TODO: return True if the DS is empty
- clear(self) // TODO: clear the DS
- reverse(self) // TODO: return the reverse of the DS
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
py-fds-1.0.tar.gz
(2.9 kB
view details)
Built Distribution
py_fds-1.0-py3-none-any.whl
(4.6 kB
view details)
File details
Details for the file py-fds-1.0.tar.gz
.
File metadata
- Download URL: py-fds-1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41a1693873d86f3cfeec97a1b2ce3465f679f0359b8776778b3123fc3ccc1b16 |
|
MD5 | 81f6df273ddab5600abd4892a0f0310e |
|
BLAKE2b-256 | ac6b83fb6a7a0367f686de6a130c45eabee0cf0c120ccecca4a2f00649df06c6 |
File details
Details for the file py_fds-1.0-py3-none-any.whl
.
File metadata
- Download URL: py_fds-1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f25d4d3902e4e3bf44a8afe3facfd8ec49f53aa6f74d41f8ee741e7fb78e081 |
|
MD5 | 1f0a22d55d3047ecc59e64bc24b5cd26 |
|
BLAKE2b-256 | f8d16f5906a52fce8b8162d96a59ad265bf38d9c5ae75c55804cbcfabaabd3be |