Find min. "join" operations for sequence
- by utyle
Let's say, we have a list/an array of positive integers x1, x2, ... , xn.
We can do a join operation on this sequence, that means that we can replace two elements that are next to each other with one element, which is sum of these elements. For example:
- array/list: [1;2;3;4;5;6]
we can join 2 and 3, and replace them with 5;
we can join 5 and…