> the task is to devide it into as less groups as possible so that in
> each group the numbers are sorted incrementally without changing the
> original order.
> for example, the above sequence can be devided into:
> 4, 5, 9,
> 1, 2, 3
> 2 groups in all.

Sort the original sequence and find the longest common subsequence
(LCS) between the sorted sequence and the original sequence. Each time,
delete the values in the LCS from both sequences.

KS


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

Reply via email to