News for hackers. Stuff that matters.
Re:Ask HN: algorithm to slice a number into parts by cperciva on Wednesday January 21, 2009 @06:15AM (#443080)
I think your problem description is missing something; otherwise n1 = n2 = n3 ... = n[m-1] = 1, nm = n - m + 1 is a trivial solution.
Re:Ask HN: algorithm to slice a number into parts by cperciva on Wednesday January 21, 2009 @07:23AM (#443125)
Edit: slices should be of distinct values.

In that case, [1, 2, 3, ... m - 1, n - m*(m-1)/2] is a trivial solution.