问题描述
您好。我必须为学校做一个项目。我的任务是选择一个数据结构,用于添加两个多项式表达式,具有高指数和大量空系数。我使用链表数据结构制作了我的程序,但是我的老师告诉我链接列表在这种情况下不如优先级队列数据结构有效。有人能告诉我如何使用c ++语言实现优先级队列以添加两个多项式表达式吗?我的项目是否有更高效的数据结构?
我尝试过:
我的程序基于链表数据结构。
Hello. I have to make a project for school. My task is to choose a data structure for the addition of two polynomial expression, with high exponents and lots of null coefficients. I made my program using linked list data structure, but my teacher told my that linked list is not as efficient as the priority queue data structure in this case. Can somebody give me a clue how to implement a priority queue for the addition of two polynomial expression using c++ language? Are there more efficient data structure for my project?
What I have tried:
My program is based on the linked list data structure.
推荐答案
这篇关于如何实现优先级队列数据结构添加两个多项式表达式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!