Given an array of numbers : a1, a2, a3..... an....
(a)    divide them in such a way that every alternate segment is given to
two persons john and mary, equally,,,, the number of segments made should be
minimum...
eg....
for input
1 4 5 6 2 2 2 2 4 5 6 1 1 7 8 8 1 7
segments :
(John)1 4 5 6 2 2 ----- (Mary)2 2 4 5 6 1 --- (john) 1 7 8 ------ (Mary) 8 1
7
minimum cuts made are 3

(b)    Divide the numbers in such a way that both recieve same sum of
numbers.
If input
3 4 5 7 2 5 2
segments
(john) 3 4 5 ----- (mary) 7 2 5 ----- (john) 2
minimum cuts are 2

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to