@@ -0,0 +1,772 @@
+import java.util.Arrays;%0Aimport java.util.Scanner;%0A%0A%0A/**%0A * Write a program that finds the sub-array with greatest sum within another array.%0A * %0A * @author Aleksandar Savev %3Csavevjr@gmail.com%3E%0A * @since 11-Feb-16%0A */%0Apublic class MaxSubSet %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        // example input: 1,2,3,-1,-2,-3,0,4,5%0A        Scanner s = new Scanner(System.in);%0A        String%5B%5D setString = s.nextLine().split(%22,%22);%0A        s.close();%0A%0A        int%5B%5D set = new int%5BsetString.length%5D;%0A        for (int i = 0; i %3C set.length; i++) %7B%0A            set%5Bi%5D = Integer.parseInt(setString%5Bi%5D);%0A        %7D%0A        Arrays.sort(set);%0A        for (int i = set.length - 1; i %3E set.length - 4 && i %3E= 0; i--) %7B%0A            System.out.print(set%5Bi%5D + %22 %22);%0A        %7D%0A    %7D%0A%7D%0A

Add MaxSubSet