//all the segments of an array, computing their sums, and finding the minimum. public class MinSegSum {
public static void main(String[] args) { int length = args.length; int[] a = new int[length]; int sum = 0; // The variable sum is the sum of all elements of a certain segment int subSum = 0; //subSum is the sum of all elements (except the 1st) of a certain segment int min = 999999999; //fills array from the command line for(int i = 0; i + min); }
}