Not sure if i am correct but still be very close. 1. Intial Array is A with n elements 2. Sort the Array's in descending order 3. take 2 more arrays B and C in which u keep the partition 4. pull the one element from A to B and keep keep track of the sum's in both the arrays B & C 5. Try to reach the sum in B by pulling the elements from A 6. Continue till all the n elements are partitioned. 7. If in the end still some difference is there b/w B and C, it can be settled by exchanging the elements among them as they both would be sorted.
hope this helps... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/BRRM2sjulSEJ. 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.
