O(n) Maximum subvector sum algorithm