But dude are u saying stack will be implemented as a map with
<value,priority>

and then choose element based on priority ?

regards
Ankur

On Tue, Sep 13, 2011 at 10:16 PM, Ankuj Gupta <[email protected]> wrote:

>
> For stack :- Keep incrementing the priority of each pushed element. So
> the last pushed element will have the greatest priority and the
> element pushed first will have
> lowest priority.
> For queue:- keep decrementing the priority of each inserted element.
>
> On Sep 13, 1:45 am, Ankur Garg <[email protected]> wrote:
> > How to Implement a Queue with a Priority Queue
> > Similarly how woud you implement Stack with Priority Queue
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to