Skip to content

docs: improve Heap top-level documentation#602

Open
Sleywill wants to merge 1 commit intoapple:mainfrom
Sleywill:main
Open

docs: improve Heap top-level documentation#602
Sleywill wants to merge 1 commit intoapple:mainfrom
Sleywill:main

Conversation

@Sleywill
Copy link

Addresses #74.

What changed

Restructures the Heap doc comment to be useful to a wider audience before going into implementation details, as suggested in the issue.

Before: The comment opened directly with "A container type implementing a double-ended priority queue" and immediately dove into the min-max heap data structure internals.

After:

  • Opens with a plain-language description of when to use a Heap
  • Includes a usage example that shows optional return types (matching actual API)
  • Lists the key operations with their complexity and symbol links
  • Moves the implementation details under a clearly labelled ## Implementation Details section

Checklist

  • No behavior changes — documentation only
  • Follows existing comment style in the file

Addresses apple#74: restructures the `Heap` doc comment to explain what the data
structure is useful for before diving into implementation details.
Adds a "When to use" intro, usage example with optional results, complexity
summary with symbol links, and moves implementation details under a header.
@Sleywill Sleywill requested a review from lorentey as a code owner March 12, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant