There are n
lines of length 90 inches which need to be cut at 1/2 places so that the new parts formed after cut have a total length as close as possible to 90.
Conditions
the minimum length is 24 and maximum is 48.
the length to be cut are decided on input
example we need
6 lines of 24 5 of 26 4 of 28 7 of 32 8 of 37 9 of 38 7 of 40 6 of 42 ....
There for total line segments after cut = 6+5+4+7+8+9+7+6 = 42
which would need around 12 lines of 90" ..
how to cut them to minimize wastage e.g
If I cut 26+28 +32 = 86
, I waste 4". How to keep the wastage to minimum?