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
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
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
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
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