Write a Program to Find the Sum of Contiguous Subarray within a 1 – D Array of Numbers which has the Largest Sum.
If we are entering 8 elements (N = 8), with array element values as -1,-5,5,3,-2,5,4 and 1 then, The largest contiguous subarray is: 5 3 -2 5 4 1 The sum of the largest contiguous subarray is: 16
No comments:
Post a Comment