LeetCode Exercise 7

Due: April 8, 11:55 pm


Group 1 Kyle, John
Group 2 Thomas, Flynn, Issac
Group 3 Boning, Preston
Moodle Link

53. Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.

For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarray [4,-1,2,1] has the largest sum = 6.

You are to find a dynamic programming solution to this problem, and implement it on Leetcode.

Then you will do a runtime analysis of your solution.

Turn in:

  1. Source code for your solution
  2. Samples runs showing the operation with input and outputs.
  3. A complete asymptotic analysis.
  4. An explanation of how this using the principle of optimality

Be prepared to discuss you solutions in class.

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2019-03-31 - JimSkon
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback