https://github.com/ayxhmn/heapyy
Python code snippets for competitive programming
https://github.com/ayxhmn/heapyy
algorithms competitive-programming data-structures python
Last synced: 10 months ago
JSON representation
Python code snippets for competitive programming
- Host: GitHub
- URL: https://github.com/ayxhmn/heapyy
- Owner: ayxhmn
- Created: 2025-03-27T16:43:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-30T15:22:14.000Z (12 months ago)
- Last Synced: 2025-06-13T08:05:40.922Z (10 months ago)
- Topics: algorithms, competitive-programming, data-structures, python
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

**heapyy** is a Python library for competitive programming, providing efficient implementations of common data structures and algorithms.
## 🚀 Features
- Singly Linked List
- Doubly Linked List
- Binary Tree
- Graph data structure
- Graph Traversals (bfs, dfs)
- (More coming soon!)
## 📦 Installation
```bash
pip install heapyy # (If published on PyPI in the future)
```
Or install locally for development:
```bash
pip install -e .
```
## 🔥 Usage
Importing heapyy:
```python
import heapyy
```
Using singly linked list:
```python
from heapyy import LinkedList
ll = LinkedList()
ll.append(10)
ll.append(20)
ll.append(30)
ll.prepend(5)
print(ll.to_list()) # Output: [5, 10, 20, 30]
ll.remove(20)
print(ll.to_list()) # Output: [5, 10, 30]
print(ll.find(10)) # Output: True
print(ll.find(100)) # Output: False
```
## 🛠️ Development
Clone the repository:
```bash
git clone https://github.com/ayxhmn/heapyy.git
cd heapyy
```
Run tests:
```bash
python -m unittest discover tests
```
## 🤝 Contributing
Pull requests are welcome! If you want to add new algorithms or optimize existing ones, feel free to contribute.