codeIIEST / Algorithms

A Repository to store implementation of some of the famous Data Structures and Algorithms (mainly in C/C++/Java/Python) for everyone to learn and contribute.
http://codeiiest.github.io/Algorithms/
MIT License
202 stars 161 forks source link

Create Maximum Circular Subarray Sum #290

Open Dishantdhillon opened 2 years ago

Dishantdhillon commented 2 years ago

Thank you for your contribution. Please provide the details requested below.

ISSUE NUMBER

SHORT DESCRIPTION

given N numbers(both +ve and -ve), arranged in a circle, you have to find the maximum sum of consecutive numbers.

TESTING

Input 9 11 10 -20 5 -3 -5 8 -13 10

Output 31

Input 5 -1 -2 -5 -4 -7

Output -1