Skip to content

Conversation

@Amxx
Copy link
Collaborator

@Amxx Amxx commented Jun 16, 2024

Fixes #3410
Alternative to #5076

This PR uses names from https://en.wikipedia.org/wiki/Heap_(data_structure)#Operations

  • Basic
    • peek
    • insert
    • pop
    • replace
  • Internal
    • siftUp
    • siftDown

For the inspection part, we use length instead of size for consistencty with all other structures in the utils/struct folder.

PR Checklist

  • Tests
  • Tests Fuzzing
  • Documentation
  • Changeset entry (run npx changeset add)

@changeset-bot
Copy link

changeset-bot bot commented Jun 16, 2024

🦋 Changeset detected

Latest commit: 5b07512

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Amxx Amxx requested review from cairoeth and ernestognw June 21, 2024 08:39
@Amxx Amxx requested review from cairoeth and ernestognw July 19, 2024 06:40
ernestognw
ernestognw previously approved these changes Jul 23, 2024
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some docs, mostly minor things. LGTM

I can reapprove if suggestions are applied

@Amxx Amxx requested a review from ernestognw July 23, 2024 07:44
Copy link
Contributor

@cairoeth cairoeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

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.

Add priority queue as a data structure to be able to implement max/min heaps

3 participants