-
June 5th, 2016, 06:21 AM
#1
Need help on Priority Queue Implementations
Hi Everyone,
I need implementations of Priority Queue by using ordered array,unordered array,ordered linked list and unordered linked list and also for the heap.I tried on internet for examples but they are very simple not interactive.I need operations like Insert,findMax,delMax and merge in interactive mode.Please help me for these implementations in C++.
Thanks in advance.
-
June 5th, 2016, 09:11 AM
#2
Re: Need help on Priority Queue Implementations
What do you mean by "interactive mode"?
Anyway, take a look at the std::priority_queue adapter for an example of what a priority queue interface might be like. To implement with an ordered array or unordered array, you can build your implementation with the help of say, std::vector. To implement with an ordered linked list or unordered linked list, you can build your implementation with the help of say, std::list. To implement with a heap, you could build your implementation with the help of say, a std::vector with std::make_heap, std::push_heap, and std::pop_heap.
-
June 5th, 2016, 01:50 PM
#3
Re: Need help on Priority Queue Implementations
I need implementations of Priority Queue
Is this for a home-work assignment? if so, then given the advice from laserlight in post #2, if you post what you then have we'll be able to provide further advice and guidance. See http://forums.codeguru.com/showthrea...ork-assignment
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|