Array
2551. Put Marbles in Bags
Given weights and k bags. Marbles are distributed into k non-empty contiguous groups; a group [i..j] costs weights[i] + weights[j]. Return the difference between the maximum and minimum possible…
Loading…
Given weights and k bags. Marbles are distributed into k non-empty contiguous groups; a group [i..j] costs weights[i] + weights[j]. Return the difference between the maximum and minimum possible…
Loading…