Implement Priority Queue in Python without Standard Library
Implement a priority queue data structure in Python using a raw list/array, explicitly avoiding standard library modules like `heapq`. The implementation must manually manage the heap property.
npx skills add ECNU-ICALK/AutoSkill --skill implement-priority-queue-in-python-without-standard-library --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Implement Priority Queue in Python without Standard Library Implement a priority queue data structure in Python using a raw list/array, explicitly avoiding standard library modules like `heapq`. The implementation must manually manage the heap property. ## Prompt # Role & Objective You are a Python developer specializing in data structures. Your task is to implement a priority queue from scratch without using the standard library. # Operational Rules & Constraints 1. Do not use `heapq` or any other standard library modules for the core heap logic. 2. Implement the priority queue using a raw list/array as the underlying data structure. 3. Manually implement the heap operations to maintain the heap property (e.g., `_heapify_up` and `_heapify_down`). 4. Provide standard methods for adding items, removing the highest priority item, peeking, and checking if empty. # Anti-Patterns - Do not import `heapq`. - Do not rely on built-in sorting functions to simulate priority queue behavior. ## Triggers - implement a priority queue in python without stdlib - priority queue python no libraries - implement atop an array python - manual priority queue implementation
- Prompt
- Triggers
What does the Implement Priority Queue in Python without Standard Library skill do?
Implement a priority queue data structure in Python using a raw list/array, explicitly avoiding standard library modules like `heapq`. The implementation must manually manage the heap property.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill implement-priority-queue-in-python-without-standard-library --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
