MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

Dynamic Programming/Kadanes.cpp:17–26  ·  view source on GitHub ↗

Driver Code

Source from the content-addressed store, hash-verified

15
16// Driver Code
17int main()
18{
19 int a[] = { -2, -3, 4, -1, -2, 1, 5, -3 };
20 int n = sizeof(a) / sizeof(a[0]);
21
22 // Function Call
23 int max_sum = maxSubArraySum(a, n);
24 cout << "Maximum contiguous sum is " << max_sum;
25 return 0;
26}

Callers

nothing calls this directly

Calls 1

maxSubArraySumFunction · 0.70

Tested by

no test coverage detected