Open Dishantdhillon opened 3 years ago
Thank you for your contribution. Please provide the details requested below.
given N numbers(both +ve and -ve), arranged in a circle, you have to find the maximum sum of consecutive numbers.
Input 9 11 10 -20 5 -3 -5 8 -13 10
Output 31
Input 5 -1 -2 -5 -4 -7
Output -1
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