Maximum subarrey for begginer

Hi!
I have to write a program, that finds the maximum subarrey, from 8 number sequence, but I don't know how to make proper alogorithm that does that. Every help will be appriciated.
Google and Wikipedia are always a good place to start with common CS problems:

https://en.wikipedia.org/wiki/Maximum_subarray_problem

You'll need to write a function that works just like the code in the article. Since this is C++ (and not Python), remember to provide begin and end indices into your array:

1
2
3
4
int maxsubarray( int a[], int begin, int end )
{
  ...
}

Good luck!
Topic archived. No new replies allowed.