Showing posts with label Uva - Kadane's Algorithm. Show all posts
Showing posts with label Uva - Kadane's Algorithm. Show all posts

Uva 108 - Maximum Sum

Oct 5, 2015

Problem: 108 - Maximum Sum

Description:
We can solve this problem with O(N^3) order. Kadane's algorithm can be used to find the contiguous subarray within a one-dimensional array of numbers (containing at least one positive number). The complexity of Kadane's algorithm for 1D array is O(N).

Read : Maximum subarray problem