Ayush7614 / Daily-Coding-DS-ALGO-Practice

A open source project🚀 for bringing all interview💥💥 and competative📘 programming💥💥 question under one repo📐📐
https://daily-ds-algo.github.io/DS-Algo-Website/
MIT License
321 stars 474 forks source link

kadane's algorithm #1601

Closed Rounak-chauhan closed 3 years ago

Rounak-chauhan commented 3 years ago

Aim

Since -2 < 0, value -2 doesn't contribute to the sum. Thus, ignore it and proceed to the next index. Since 1 > 0, value 1 does contribute. Hence, compute -3+1 = -2 and store it in index 2. The result vector is so far: [-2, 1, -2, 4]. Last element to evaluate is 4. Since -2 < 0, -2 does not contribute positively to the sum. Thus, ignore it. Having checked all elements, the final result vector is: [-2, 1, -2, 4]. The maximum subarray is max(num)=4.

Details

Programming language

Rounak-chauhan commented 3 years ago

please assign me this under java under LGMSOC'21

Sathwika-02 commented 3 years ago

Hi, I want to implement this in C++ as apart of LGM-SOC'21. @Amit366 @Ayush7614 Please assign it to me. Thankyou!!

Arushi247 commented 3 years ago

@Ayush7614 I'd like to work on this issue in C language under HCSSoC. Kindly assign me this issue.

sonamgupta136 commented 3 years ago

Please assign me this issue in python language under LGMSOC'21 @Ayush7614

Amit366 commented 3 years ago

This is already done