FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

javascript-algorithms/src/algorithms/sets/maximum-subarray at master · caiquejjx/javascript-algorithms · GitHub

Repository navigation

Latest commit

 

History

History
 
 
  1. javascript-algorithms
  2. src
  3. algorithms
  4. sets

maximum-subarray

Folders and files

README.md

Maximum subarray problem

The maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array, a[1...n], of numbers which has the largest sum, where,

Example

The list usually contains both positive and negative numbers along with 0. For example, for the array of values −2, 1, −3, 4, −1, 2, 1, −5, 4 the contiguous subarray with the largest sum is 4, −1, 2, 1, with sum 6.

References


Back | FazBrowse Home | New Git URL