Skip to content

Is it a "stable queue" or not? #20

Description

@dko-slapdash

Hi.

If I insert multiple items which are "equal" (i.e. for which the comparator returns 0), does pop() preserve the order in which the items were push()'ed? (Order preservation is called "stable property", i.e. there are "stable sorts", "stable queues" etc.)

Binary heap is typically not stable - https://cstheory.stackexchange.com/questions/593/is-there-a-stable-heap - so I assume tinyqueue is not stable as well?

It's not mentioned anywhere in the docs...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions