Skip to content

docs: add executable worked example for BinaryHeap (Issue #27) - #65

Open
9808Tarun wants to merge 1 commit into
S-AI-Projects:masterfrom
9808Tarun:student/e26b07f0633/R50-T027
Open

9808Tarun wants to merge 1 commit into
S-AI-Projects:masterfrom
9808Tarun:student/e26b07f0633/R50-T027

Conversation

@9808Tarun

Copy link
Copy Markdown

Description
Added executable JSDoc worked example documentation and matching test suite for BinaryHeap in Data-Structures/Heap/BinaryHeap.js, detailing intermediate state transitions (bubble-up and sink-down heapify operations).

Related Issue
Fixes: #27

Type of Change

  • Bug Fix
  • New Feature
  • UI/UX Improvement
  • Performance Improvement
  • Tests
  • Documentation
  • Refactoring / Maintenance
  • CI/CD

Changes Made

  • Added JSDoc worked example to Data-Structures/Heap/BinaryHeap.js near line 10 detailing key state transitions for insertion and deletion with minHeapComparator.
  • Added tests in Data-Structures/Heap/test/BinaryHeap.test.js executing the documented worked example step-by-step and asserting intermediate peek, empty, and extractTop outputs.
  • Tested smallest valid input (single element insertion) and ordinary input (multi-element insertion and extraction).
  • Created work/R50-T027/check.py to non-interactively run test checks and capture output logs and versions.

Screenshots / Recordings
N/A

Testing

  • Executed python3 work/R50-T027/check.py locally.
  • Verified test suite passes for Data-Structures/Heap/test/BinaryHeap.test.js.

Checklist

  • I have tested my changes locally.
  • I have added or updated tests, if needed.
  • I have updated documentation, if needed.
  • I have followed the project's coding guidelines.
  • I have run the relevant tests and checks.
  • I have addressed previous review feedback, if applicable.

Additional Notes
N/A

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.

Tarun Y — R50-T027: Publish a runnable example for BinaryHeap (BinaryHeap.js) [Data-Structures/Heap/BinaryHeap.js]

1 participant