On 3/8/06, SPX2 <[EMAIL PROTECTED]> wrote:
about the 3rd problem such an algorithm could be.
where L1,L2 are as the limits are for quicksort(its a divide and
conquer method)
By bunchtype i mean a set.
v is the primordial bunch consisting of v1...vn cards(the big set)
T;//will be the solution
bunchtype evaluate(L1,L2)
{
if(L2=L1+1)
if(corespond(vL2,vL1)=1)return {{L2},{L1}}
else return {L2,L1}
if(can_split_more)
{bunch1=evaluate(L1,(L1+L2)/2);
bunch2=evaluate([L1+L2)/2]+1,L2);
V=V-(bunch1+bunch2)+recombine(bunch1,bunch2);
//also here its essential to retain positions of elements
//wich will be permuted through the alogirthm.
}
}
now for recombine you have basically an interclassation of sets wich is
actually
a reunion.
this could be done linearly.
Anyway...i cant really remember quicksort very well...
maybe someone will look at this or better..propose a better solution http://ajay.mishra19.googlepages.com
IIT KGP
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
merge.c
Description: Binary data
- [algogeeks] Re: need help help n help!!! ajay mishra
