Tag: maximumsubarray

  • Data Structures and Algorithms in Java – Arrays – Maximum Subarray

    Problem: Given an integer array find the continuous sub array with the maximum sum in the array. Input: For example , consider the input [5,-6,8,-4,-2,7,4,-1] There are many possible continuous sub arrays in the above array [5],[5,-6] , [5,-6,8] , [-6,8,-4,-2] etc. The elements just need to be continuous as present in the initial array.…