Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    Should there be one? First time I hear the term. If it's something into which you insert items and then pull them out according to a priority... that's a priority_queue. Commented Mar 17, 2019 at 12:42
  • 3
    What do you want this priority_stack to do? In what way would it be different from priority_queue? Commented Mar 17, 2019 at 12:44
  • @HolyBlackCat I got it ! priority stack is like a priority queue but removing the items using LIFO instead of FIFO (priority is orthogonal to the *IFO, the difference is visible only for items having the same priority). Commented Mar 17, 2019 at 13:12
  • @StoryTeller Indeed, it's the first time I hear about it. But it's a concept that exists, even if it's not popular. For items of different priority, it's as you said. For several items of the same priority, it's LIFO vs. FIFO. Commented Mar 17, 2019 at 13:38
  • @Christophe - TBH I can't find anything about how the standard library adapter is supposed to order equivalent items. I'm not sure it's a "queue" in the sense the OP is talking about. Commented Mar 17, 2019 at 13:43