动态优先级队列(堆)实现

编程入门 行业动态 更新时间:2024-10-24 22:24:06
本文介绍了动态优先级队列(堆)实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好,这是我的问题。我必须创建一个动态优先级队列,这是一个 ,而我的书根本没用,所以我没有关于如何创建它的线索。我读了类似静态优先级队列的东西,它是一个数组堆[i],例如i / 2是我的父亲等等。 静态优先级队列的代码是这样的:

展开 | 选择 | Wrap | 行号

解决方案

如果你有2个月的罢工,那么你可能会在学期放松,所以不要费心去做项目:P:P:P

@Tassos Souris 哈哈哈! ellhnas eisai?那么实际上不是2个月而是1.5,所以我们会看到...

请解释一下动态优先级队列(堆)是什么。如果优先级是动态的,那么什么事件可以导致它改变? 我相信这个术语的含义是开放的解释,所以我想听听你需要什么

Hello everyone, here is my problem. I have to make a dynamic priority queue,which is a heap, and my book isn''t helpful at all, so I have no clues on how to create it.. I read something like a static priority queue, which is an array heap[i], and for example i/2 is the father of i and so on.. the code of the static priority queue is this:

Expand|Select|Wrap|Line Numbers

解决方案

If you had a strike for 2 months then you are probably loosing the semester so do not bother making the project :P:P:P

@Tassos Souris hahaha! ellhnas eisai? Well not actually 2 months but 1,5 so we''ll see...

Please explain what a dynamic priority queue(heap) is. If priority is dynamic, then what events can cause it to change? I believe the meaning of this term is open to interpretation, so I would like to hear what you need it to be.

更多推荐

动态优先级队列(堆)实现

本文发布于:2023-10-30 11:40:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1542745.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:优先级   队列   动态

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!