codinasion-archive / codinasion-monorepo

Community Monorepo
https://codinasion.org
MIT License
52 stars 167 forks source link

Write a R program to find the maximum sum of a contiguous subarray (circular) #1717

Closed harshraj8843 closed 1 year ago

harshraj8843 commented 2 years ago

Description

Write a R program to find the maximum sum of a contiguous subarray (circular)

Maximum sum of a circular subarray is the task of finding the contiguous subarray within a circular one-dimensional array of numbers which has the largest sum. For example, for the sequence of values 10, -3, -4, 7, 6, 5, -4, -1; the contiguous subarray with the largest sum is 7, 6, 5, with sum 18.

Input  : [8, -8, 9, -9, 10, -11, 12]
Output : 22
How to contribute - Save the solution in `program/find_the_maximum_sum_of_a_contiguous_subarray_(circular).r` file - Add `find_the_maximum_sum_of_a_contiguous_subarray_(circular).r` file in `find-the-maximum-sum-of-a-contiguous-subarray-(circular)` folder
jay13makhija commented 2 years ago

I can do it in C++

harshraj8843 commented 2 years ago

Hey @jay13makhija

Sorry but codinasion/codinasion#1705 has already been assigned to someone

Please contribute to another good first issue


You can comment !assign on any good first issue you want to contribute to, to be auto-assigned

!assign
abdurafeyf commented 1 year ago

!assign