Educational DSA implementations (Stack, Queue, Graph, Tree). Core algorithms library.
Project description
pydatastruct
Educational DSA implementations
Installation
pip install pydatastruct
💡 Usage Examples
Basic Operations
from pylib_datastruct import Stack, Queue, Graph, Tree
# Stack
stack = Stack()
stack.push(1)
stack.push(2)
stack.pop() # 2
# Queue
queue = Queue()
queue.enqueue(1)
queue.enqueue(2)
queue.dequeue() # 1
# Graph
graph = Graph()
graph.add_edge("A", "B")
graph.add_edge("B", "C")
neighbors = graph.get_neighbors("A")
# Tree
tree = Tree(5)
tree.insert(3)
tree.insert(7)
inorder = tree.inorder()
AI/ML Use Cases
from pylib_datastruct import Stack, Queue, Graph, Tree
# Use stack for DFS in ML graph algorithms
stack = Stack()
stack.push(start_node)
# Process nodes...
# Use queue for BFS
queue = Queue()
queue.enqueue(root)
# Process nodes...
📚 API Reference
See package documentation for complete API reference.
🤖 AI Agent Friendly
This package is optimized for AI agents and code generation tools:
- Clear function names and signatures
- Comprehensive docstrings with examples
- Type hints for better IDE support
- Common use cases documented
- Zero dependencies for reliability
License
MIT
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 pylib_datastruct-0.1.0.tar.gz.
File metadata
- Download URL: pylib_datastruct-0.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b54b2d28009490c6d71ab8c2afc15103f17cc1f6f511ac29f5335331ae103bf
|
|
| MD5 |
1e506efb24e6aede534c86916b30868c
|
|
| BLAKE2b-256 |
de8f132e7cd4500db88852af74842d2eaad190ab697296ad1505d3c9f5e7755d
|
File details
Details for the file pylib_datastruct-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pylib_datastruct-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9be765680c732c8827db5d3270d50c57e2bf9261add45d3f0288695acccd1094
|
|
| MD5 |
f213dc9a29280ba4016ee7e05a02b1f7
|
|
| BLAKE2b-256 |
9c1473e21a0fc38219d5cbfb348b1806e489e998902d4a66a3ac18548434737b
|