Arrays Series #10- Kadane's Algorithm- Maximum sum subarray problem - (Java)

Publicado el: 28 agosto 2022
en el canal de: Code With Ease - By Varsha
435
6

Given an array Arr[] of N integers. Find the contiguous sub-array(containing at least one number) which has the maximum sum and return its sum.


Example 1:

Input:
N = 5
Arr[] = {1,2,3,-2,5}
Output:
9
Explanation:
Max subarray sum is 9
of elements (1, 2, 3, -2, 5) which
is a contiguous subarray.
Example 2:

Input:
N = 4
Arr[] = {-1,-2,-3,-4}
Output:
-1
Explanation:
Max subarray sum is -1
of element (-1)

Practice links:
https://practice.geeksforgeeks.org/pr...

https://leetcode.com/problems/maximum...

Other playlists in the channel that you can follow:

➡️ Recursion Primer Series -    • Recursion Primer Series  
➡️ String coding interview questions -    • String interview questions  
➡️ Arrays Series -    • Arrays Series  
➡️Linked List Series -    • Linked List Series  
➡️ Sorting Primer Series -    • Sorting primer series  
👉
=======================================================

Please click the LIKE button so that this kind of content can be seen by as many as possible aspiring engineers and professionals. Doing so gives me even more motivation to post such content in the future.
Please comment below and let me know if you have any questions or concerns.

Additionally, don't forget to click the bell symbol to receive notifications and subscribe to the channel.
Follow us on:
➡️Twitter -   / codeease  
----------------------------------------------------------
Created and Instructed by:
Varsha Das
Mid-senior Software Engineer, Content Curator of @Code With Ease

➡️ LinkedIn -   / varsha-das-se  
➡️ Quora - https://www.quora.com/profile/Varsha-...
➡️ Hashnode - https://varsha-das.hashnode.dev/

Code With Ease is meant to make problem-solving in programming easier. For DSA preparation, we post topic-specific videos pertaining to Coding Interview topics so that everyone may approach such questions with a clear thought process and achieve the best outcomes. In addition, we make an effort to include different "Primer Series" that teach particular concepts or algorithms. We want to be the one-stop solution for everything pertaining to DSA preparation and programming foundations in general, saving candidates from having to visit many sources in order to receive structured content.
Additionally, we believe that learning to code entails much more than only "cracking the coding interview." The long-term goal of this channel is to create more proficient problem-solvers in this field so that, in the end, we can create fantastic products and be able to resolve challenging issues in our environment to improve the quality of life for everyone.

#arraysinjava #codinginterviewquestions #faang #javaprogramming #kadanealgorithm #maximumsumsubarray


En esta página del sitio puede ver el video en línea Arrays Series #10- Kadane's Algorithm- Maximum sum subarray problem - (Java) de Duración hora minuto segunda en buena calidad , que subió el usuario Code With Ease - By Varsha 28 agosto 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 435 veces y le gustó 6 a los espectadores. Disfruta viendo!