title: Split given array into k sub arrays such that maximum sum of all sub arrays is minimum
body: <p>I'm trying to tackle the above problem where I have an array e.g. [1,2,3,4,5] and I want to split it into k subarrays such that the max size of those subarrays is the minimum possible
  e.g. for k = 3 that would be:</p>
  <pre><code>[5] [4,1] [3,2] 
  max(...) = 5
  </code></pre>
  <p>The only similar thing that I could find is:
  <a href="https://www.geeksforgeeks.org/split-the-given-array-into-k-sub-arrays-such-that-maximum-sum-of-all-sub-arrays-is-minimum/" rel="nofollow noreferrer">https://www.geeksforgeeks.org/split-the-given-array-into-k-sub-arrays-such-that-maximum-sum-of-all-sub-arrays-is-minimum/</a></p>
  <p>But it does not give a correct result with the example above and it does not return the arrays, which is something that is needed in my case.</p>
  <p>Ideally I want to do this in Python, but also pseudocode would work</p>
  <p>Any help with this would be much appreciated</p>