@@ -0,0 +1,906 @@
+package arrays.maximum_sub_array;%0A%0A/*%0A%09This class encapsulates the result of maximum sub array computation.%0A%09Array Starting index, ending index and sum of elements between those indices%0A*/%0A%0Aclass SubArray%7B%0A%0A%09private int start = -1; %09%09%09// start index of sub array%0A%09private int end = -1; %09%09%09%09// end index of sub array%0A%09private long sum = Long.MIN_VALUE; %09// Sum of sub array %0A%0A%0A%09// Sets start%0A%0A%09public void setStart(int start)%7B%0A%09%09this.start = start;%0A%09%7D%0A%0A%09// Sets end%0A%0A%09public void setEnd(int end)%7B%0A%09%09this.end = end;%0A%09%7D%0A%0A%0A%09// Sets sum%0A%0A%09public void setSum(long sum)%7B%0A%09%09this.sum = sum;%0A%09%7D%0A%0A%0A%09// Returns start%0A%0A%09public int getStart()%7B%0A%09%09return start;%0A%09%7D%0A%0A%0A%09// Returns end%0A%0A%09public int getEnd()%7B%0A%09%09return end;%0A%09%7D%0A%0A%0A%09// Returns Sum%0A%0A%09public long getSum()%7B%0A%09%09return sum;%0A%09%7D%0A%0A%0A%09// Returns string representation of sub array%0A%09public String toString()%7B%0A%09%09return %22Sum: %22+sum +%22, Start: %22+start +%22, End: %22+end;%0A%09%7D%0A%0A%7D%09%0A%0A

Add SubArray class for kadane's algorithm'