Maximum sub-array is a programming challenge on LeetCode. You are provided with an array of integers. These elements could be all positive, all negative or a combination of both. A sub-array is a smaller array formed using the elements of the original array. The condition for this problem is that the elements of the sub-array should be contiguous. Out of all the contiguous sub-arrays possible we need to find the maximum sum that can be formed. Watch the video to understand the problem in a simplified manner. I then work along with you to solve it first using a Brute Force approach, and then an efficient approach. All along with visuals and explanations.
00:00 - Intro
00:29 - Problem Statement and Test Case
02:15 - Brute Force Method
04:15 - Optimized Solution
07:10 - Dry-run of code
📚 Links I talk about in the video:
Actual problem on LeetCode: https://leetcode.com/problems/maximum...
Code on Github: https://github.com/nikoo28/java-solut...
Test cases on GitHub: https://github.com/nikoo28/java-solut...
📘 A text based explanation is available at: https://studyalgorithms.com/array/max...
Kadane's algorithm: https://en.wikipedia.org/wiki/Maximum...
To see more videos like this, you can show your support on https://www.buymeacoffee.com/studyalg...
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Follow on Twitter at: / studyalgorithms
Follow on Tumblr at: / studyalgos
Subscribe to RSS feeds: https://studyalgorithms.com/feed/
#leetcode #programming #interview
On this page of the site you can watch the video online Maximum Sub-Array Sum (LeetCode 53) | Kadane's Algorithm | Study Algorithms with a duration of hours minute second in good quality, which was uploaded by the user Nikhil Lohia 25 June 2020, share the link with friends and acquaintances, this video has already been watched 28,207 times on youtube and it was liked by 545 viewers. Enjoy your viewing!