Skip to content

PappaLaity/data-structures-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌿 Laity Data Structures

Version Python License

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:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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

About

Data Structure assignment using python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages