negated-max-heap-idiom

Status: IN

Max-heap behavior is emulated by negating all values on insertion and negating again on extraction, since Python's `heapq` only provides a min-heap — a standard idiom used across heap-based solutions in this repo.

Source: entries/2026/06/06/take-gifts-from-the-richest-pile-solution.md

JSON