A professional and well-documented data structures package for Python.
Project description
dscollections
dscollections is a professional, production-quality Python package for Data Structures and Algorithms (DSA).
Author: Sanjay Saravanan Version: 0.2.0
Key Highlights
- Professional package layout (
src/style) with PyPI-ready metadata. - Rich collection of commonly used data structures.
- Type-hinted APIs for maintainable code and IDE support.
- Readable object representations: printing a DS shows its contents.
- Unit tested using
pytest.
Included Data Structures
Linear
DynamicArray[T]Stack[T]Queue[T]Deque[T]CircularQueue[T]SinglyLinkedList[T]DoublyLinkedList[T]
Trees
BinarySearchTree[T]
Graphs
Graph[T](directed or undirected)
Heaps & Priority
MinHeap[T]MaxHeap[T]PriorityQueue[T]
Hash Structures
HashMap[K, V]HashSet[T]
Advanced
TrieDisjointSet[T](Union-Find)
Installation
pip install pydscollections
Print-friendly Behavior
All data structures implement informative __repr__, so printing displays content directly.
from dscollections import Stack, Queue, BinarySearchTree, HashMap
stack = Stack([1, 2, 3])
queue = Queue(["a", "b"])
bst = BinarySearchTree[int]()
for x in [10, 5, 15]:
bst.insert(x)
m = HashMap[str, int]()
m.put("x", 100)
print(stack) # Stack(top->bottom=[3, 2, 1])
print(queue) # Queue(front->rear=['a', 'b'])
print(bst) # BinarySearchTree(in_order=[5, 10, 15])
print(m) # HashMap({'x': 100})
License
MIT License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydscollections-0.2.0.tar.gz.
File metadata
- Download URL: pydscollections-0.2.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c3c9a69dadb5cc8df3687b11e2508d3d5f14339c85f78028fdefad05d1d3159
|
|
| MD5 |
2ca45ef1d05d8bca720af7d243443281
|
|
| BLAKE2b-256 |
6b413bdd4320a8584c77c095d52960ac110db5926b2c6d74438f9ae0a1328eaa
|
File details
Details for the file pydscollections-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pydscollections-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a268549ac6c0c0f3f318636b1c9862eb9c4e6d2f7a147ff783fd94f1bb068fa9
|
|
| MD5 |
6ac07c289e35cdf366e3fc5792a2ca0d
|
|
| BLAKE2b-256 |
6753d34eb79f1f78e3547da497ca3c3260635b9242fd98603b7ddaf988de84ac
|