gpt4 book ai didi

c# - .Net 中的优先级队列

转载 作者:IT王子 更新时间:2023-10-29 03:29:32 27 4
gpt4 key购买 nike

<分区>

我正在寻找优先级队列或堆数据结构的 .NET 实现

Priority queues are data structures that provide more flexibility than simple sorting, because they allow new elements to enter a system at arbitrary intervals. It is much more cost-effective to insert a new job into a priority queue than to re-sort everything on each such arrival.

The basic priority queue supports three primary operations:

  • Insert(Q,x). Given an item x with key k, insert it into the priority queue Q.
  • Find-Minimum(Q). Return a pointer to the item whose key value is smaller than any other key in the priority queue Q.
  • Delete-Minimum(Q). Remove the item from the priority queue Q whose key is minimum

除非我找错了地方,否则框架中没有。有人知道一个好的吗,还是我应该自己动手做?

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com