Data Structure Package By Pappalaity
Project description
๐ฟ Laity Data Structures
Laity Data Structures is a Python package that provides simple and educational implementations of essential non-primitive data structures such as stacks, queues, linked lists, and binary search trees.
Whether you're a student, a developer preparing for interviews, or someone curious about how data structures work under the hood โ this package is for you.
โจ Features
- โ Easy-to-read Python code
- ๐งฑ Stack, Queue, Linked List, Binary Search Tree implementations
- ๐ Educational method names and documentation
- ๐ฆ Simple pip installation
- ๐ Ideal for learning & teaching
- You can check the documentation website
๐ฆ Installation
pip install laity-data-structures
Once installed, you can import any class into your project:
from laity.stack import Stack
s = Stack()
s.push(10)
s.push(20)
s.display() # Output: [10, 20]
๐งฐ Data Structures Included
๐ Stack
A Last-In, First-Out (LIFO) linear data structure.
stack.push(value)
stack.pop()
stack.peek()
stack.is_empty()
stack.size()
stack.display()
๐ค Queue
A First-In, First-Out (FIFO) linear structure for sequential data processing.
queue.enqueue(value)
queue.dequeue()
queue.peek()
queue.rear()
queue.is_empty()
queue.display()
๐ Singly Linked List
A series of nodes connected using pointers. Efficient for insertions and deletions.
linked_list.insert(value)
linked_list.insertAtBeginning(value)
linked_list.insertAfter(index, new_value)
linked_list.delete(value)
linked_list.search(value)
linked_list.traverse()
linked_list.display()
๐ณ Binary Search Tree (BST)
A hierarchical structure where each node has at most two children. Left child < node < right child.
bst.insert(value)
bst.search(value)
bst.printInOrder()
bst.printPreOrder()
bst.printPostOrder()
๐ Project Structure
laity-data-structures-py/
โ
โโโ laity/
โ โโโ stack.py
โ โโโ queue.py
โ โโโ linked_list.py
โ โโโ tree.py
โ
โโโ examples/
โ โโโ stack_test.ipynb
โ โโโ queue_test.ipynb
โ โโโ linked_list_test.ipynb
โ โโโ tree_test.ipynb
โ
โโโ README.md
โโโ setup.py
โโโ LICENSE
๐ค Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
๐ Acknowledgements
Created with โค๏ธ by PappaLaity
Inspired by educational goals and the love of clean, simple code.
๐ Ready to Explore?
Install it, play with it, modify it โ and level up your understanding of data structures one line at a time.
pip install laity-data-structures
Project details
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 laity_data_structures-0.1.5.tar.gz.
File metadata
- Download URL: laity_data_structures-0.1.5.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91ee15c1d18a8a2016f070d09ef9d4d833d93ac31f891129b62fd5726bb964a7
|
|
| MD5 |
10b178eabb6e83eb16733ab41b8a4cd3
|
|
| BLAKE2b-256 |
e4e04702fc5300c6fb4778e9cefa495754a41ff0bd3d8f9dda8e37f1174c1faa
|
File details
Details for the file laity_data_structures-0.1.5-py3-none-any.whl.
File metadata
- Download URL: laity_data_structures-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4111e01c4cbb4fcfdaf37622ff7afa4a069a64a6bf5bba5daef4e070c2f7084
|
|
| MD5 |
37f1b9048a3e6210c2807ba741411456
|
|
| BLAKE2b-256 |
879c75eb4474d21c39466bd810458a5b13f21d4aae91864890ae94f0505c5b12
|