Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   help.. totally no idea on how to make it... (http://www.go4expert.com/forums/help-totally-idea-t23516/)

cire09 7Oct2010 21:31

help.. totally no idea on how to make it...
 
Problem::confused::cryin::crazy:
suppose you are given 100 gold coins labeled w/ numbers 1 through n. Coin n has weight and worth that is sqrroot(n). Given one minute if computation, how close can you come to dividing the 100 coins into piles of 50 coins each of nearly equal weight. The output should be a difference in the weight, followed by a list of the 50 labels of coins on one side of
the scale. :confused::cryin::crazy:


PLS help me...this is the case study that is given to me but i totally suck in memorizing formulas in mathematics.. thats why i dont know how to make this one...:cryin:

ManzZup 16Oct2010 11:31

Re: help.. totally no idea on how to make it...
 
you can get two boundaries
assign to array and sort ascending for a start
then take the value at 49 as the boundary line
so you can keep adding the numbers > or < the boundary


All times are GMT +5.5. The time now is 06:02.