@Test public void test() { final int length = 100; final List<Integer> input = Collections.nCopies(length, 1); assertEquals(length, (long) LargeSumProblem.solve(input)); }
public static Long solve(final List<Integer> input) { final ForkJoinPool forkJoinPool = new ForkJoinPool(10); final long result = forkJoinPool.invoke(new RecursiveSumTask(input)); forkJoinPool.shutdown(); return result; }
LargeSumProblem { public static Long solve(final List<Integer> input) { final ForkJoinPool forkJoinPool = new ForkJoinPool(10); final long result = forkJoinPool.invoke(new RecursiveSumTask(input)); forkJoinPool.shutdown(); return result; } }
LargeSumProblem { public static Long solve(final List<Integer> input) { final ForkJoinPool forkJoinPool = new ForkJoinPool(10); final long result = forkJoinPool.invoke(new RecursiveSumTask(input)); forkJoinPool.shutdown(); return result; }  }
LargeSumProblem { public static Long solve(final List<Integer> input) { final ForkJoinPool forkJoinPool = new ForkJoinPool(10); final long result = forkJoinPool.invoke(new RecursiveSumTask(input)); forkJoinPool.shutdown(); return result; }  static Long solve(final List<Integer> input); }
LargeSumProblem { public static Long solve(final List<Integer> input) { final ForkJoinPool forkJoinPool = new ForkJoinPool(10); final long result = forkJoinPool.invoke(new RecursiveSumTask(input)); forkJoinPool.shutdown(); return result; }  static Long solve(final List<Integer> input);  }