agentsclimarketplace

Implement priority queue in python without standard library

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/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.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill implement-priority-queue-in-python-without-standard-library

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.8 KB, 238 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.