[algogeeks] Re: Pick up elements based on their priorities

2006-11-30 Thread Quintopia
I doubt there is any solution better than O(n lg n). . .the max heap sounds good to me. On Nov 30, 1:15 am, yogesh [EMAIL PROTECTED] wrote: On Nov 28, 10:27 pm, Andre [EMAIL PROTECTED] wrote: Hi, I was thinking to do something like this, but is it an efficient way to do it? Do you know

[algogeeks] Re: Pick up elements based on their priorities

2006-11-29 Thread yogesh
On Nov 28, 10:27 pm, Andre [EMAIL PROTECTED] wrote: Hi, I was thinking to do something like this, but is it an efficient way to do it? Do you know any well know algorithm to do this kind of thing? Thanks, Andre U can use a maximum heap based on prority and decrease priority after

[algogeeks] Re: Pick up elements based on their priorities

2006-11-28 Thread Andre
Hi, I was thinking to do something like this, but is it an efficient way to do it? Do you know any well know algorithm to do this kind of thing? Thanks, Andre --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[algogeeks] Re: Pick up elements based on their priorities

2006-11-28 Thread Eduardo T. Cardoso
A maximum heap should probably do the trick. On 11/28/06, Andre [EMAIL PROTECTED] wrote: Hi, I was thinking to do something like this, but is it an efficient way to do it? Do you know any well know algorithm to do this kind of thing? Thanks, Andre

[algogeeks] Re: Pick up elements based on their priorities

2006-11-27 Thread L7
So rather than A A A B B B C C D D E 3 3 3 3 3 3 2 2 2 2 1 You want A B C A B D A B C D E 3 3 2 3 3 2 3 3 2 2 1 To me, that seems pretty vague. Is there a particular order you want the values in? Otherwise, A A C A B C B B D D E 3 3 2 3 3 2 3 3 2 2 1 Is another ordering that matches the