Joe's Fish Tank

Can Anyone Solve it ?


Joe is yet to celebrate his birthday.So his dad gave him n pebbles to decorate his fish tank.Consider
his father bought 'n' pebbles.Joe wishes to arrange the pebbles in form of two piles.Joe wants the pebbles  arranged in such a manner that difference between sum of the two piles separately must be minimum.


                                                     Joe's wish to arrange as two piles    

Input:

First n refer no of pebbles his father bought
second input consist of n Integers.

Output:

Minimum difference between two piles.

Sample Input:

6
2 8 3
4 6 7

Sample Output:

0
 
Post Author

Unknown

We share resources which would help recover your mobiles, computers and also update new information about latest information and launches of products making you up to date.

No comments :

Post a Comment