Puzzles, Maths and Algorithms: Largest Sum of Consecutive Numbers
Largest Sum of Consecutive Numbers
Problem: Given an array of N integers (both positive and negative), find the sub-sequence with largest sum.
For ex: Let A = {1 2 -5 4 5 -1 2 -11} then largest sum is 10 (start = 4, end = 7)
For ex: Let A = {1 2 -5 4 5 -1 2 -11} then largest sum is 10 (start = 4, end = 7)
Read full article from Puzzles, Maths and Algorithms: Largest Sum of Consecutive Numbers
No comments:
Post a Comment