Partition array into K subsets, each with balanced sum Given array $A = \{ a_{1},a_{2}, ..., a_{n}\}$ and integer $k; 0 \lt k \le n$, partition array $A$ into $k$ subarrays, such that

$A'_{1} = \{a_{1}, ...,a_{x}\}$

$A'_{2} = \{a_{x+1},...,a_{y}\}$

$...$

$A'_{k} = \{a_{z+1},...,a_{n}\}$

where each subarray $A'_{1},A'_{2}, ...,A'_{k}$ has sum of its elements closest to $\sigma; \sigma = \frac{\sum_{i = 1}^{n} {a_{i}}}{k}$

Example:  $A = \{{5,6,1,3,4,10\}}, k = 3$

$\sigma = \frac{29}{3} = 9.\overline{66} \approx 10$

Best solution to split array is:

$A'_{1} = \{5,6\}$

$A'_{2} = \{1,3,4\}$

$A'_{3} = \{10\}$

with sums $11, 8, 10$

One way to measure "badness" of each solution, is to define function $h(A_{1},...,A_{k}) = \sum_{i = 1}^{k} {(s_{i} - \sigma)^2}$, where $s_{i}$ is sum of elements of subarray $A_{i}$

Can you point me towards the solution? I've been trying for a few days now, and I'm no closer to an algorithm than I was few days ago.
Use dynamic programming.  This is a straightforward application of dynamic programming.  This is a very nice exercise, so I'll let you do the exercise yourself and won't spoil it for you -- but since you only wanted a hint, my hint is "use dynamic programming" (that's a huge, enormous hint that should be enough for you to work out the rest of the details).

In particular, you should be able to solve this in $O(kn^2)$ time.