ladpro98's blog

By ladpro98, 11 years ago, In English

Here is the problem statement:

Given an array A[1..n]. Find the sub-array that it's sum is smallest and at least M. (all numbers in the input is 32bit integer)

Till now I cannot find a good solution. Can anyone help me with an O(n) or O(NlogN) algorithm?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it