Python Data Structures
A Python package that provides implementations of common data structures such as:
- Singly Linked List
- Stack
- Queue
- Binary Tree
- Array
This package is designed to be an easy-to-use resource for anyone interested in learning or working with fundamental data structures in Python.
Features
- Singly Linked List: A linked list where each node points to the next node.
- Stack: A LIFO (Last In First Out) data structure where elements are added and removed from the top.
- Queue: A FIFO (First In First Out) data structure where elements are added at the rear and removed from the front.
- Binary Tree: A tree structure where each node has at most two children, with left and right pointers.
Installation
You can install the package using pip:
pip install python-basic-data-structures
Usage
Singly Linked List
To use the Singly Linked List:
from my_data_structures.linked_list import LinkedList
# Create a LinkedList
ll = LinkedList()
# Insert elements
ll.insertAtBeginning(10)
ll.insertAtEnd(20)
ll.insertAfter(15, 1)
# Display the linked list
ll.display()
# Sort the list
ll.bubble_sort()
ll.display()
Stack
To use the Stack:
from my_data_structures.stack import Stack
# Create a Stack
stack = Stack()
# Push elements
stack.push(10)
stack.push(20)
# Pop elements
stack.pop()
# Display the stack
stack.display()
Queue
To use the Queue:
from my_data_structures.queue import MyQueue
# Create a Queue with a size limit
queue = MyQueue(3)
# Enqueue elements
queue.enqueue(10)
queue.enqueue(20)
# Dequeue elements
queue.dequeue()
# Display the queue
queue.display()
Binary Tree
To use the Binary Tree:
from my_data_structures.binary_tree import BinaryTree
# Create a Binary Tree
bt = BinaryTree()
# Insert elements
bt.insert(10)
bt.insert(20)
bt.insert(5)
# Search for a value
bt.search(15)
# Display the tree in different orders
print(bt.inorder())
print(bt.preorder())
print(bt.postorder())
Contributing
Contributions are welcome! If you'd like to improve the project, feel free to fork the repository, make your changes, and submit a pull request. Here are a few ways you can contribute:
- Implementing new data structures.
- Adding tests for existing structures.
- Improving documentation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
If you have any questions or suggestions, feel free to open an issue on GitHub or contact me directly:
- Email: amahamat@aimsammi.org
- GitHub: @Mahamat19
You can customize the content according to your needs, but this should serve as a solid base for your project's README. It includes essential sections like an introduction, installation instructions, usage examples, contributing guidelines, and contact information.
Metadata
Release files for python-data-structures-bootcamp 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_data_structures_bootcamp-0.1.3.tar.gz | 4.9 kB | Without provenance | Details for python_data_structures_bootcamp-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_data_structures_bootcamp-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for python_data_structures_bootcamp-0.1.3-py3-none-any.whl |
Total release size: 11.1 kB
Release files / python_data_structures_bootcamp-0.1.3.tar.gz
| Download URL | python_data_structures_bootcamp-0.1.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56c801a100eb174700f1cec61c8c9b3f399597aa5289df5d4c0c257ee25dc1f3
|
|
BLAKE2b-256 checksum How to use checksums |
2b6114ce16afa65bde5809c64a0094b30ab99b5430f59532a4a3aa7a074eb9d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / python_data_structures_bootcamp-0.1.3-py3-none-any.whl
| Download URL | python_data_structures_bootcamp-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a76c84e86185f35486c61300c434a0ba82efe120c560ea84207ccecf902598dd
|
|
BLAKE2b-256 checksum How to use checksums |
5e1a03d0e9b23a26a1d564ed324219e558cc7f929c8a50deb0431dbb4211626b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for python-data-structures-bootcamp 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.