package com.fishercoder.solutions;

public class _985 {
    public static class Solution1 {
        public int[] sumEvenAfterQueries(int[] A, int[][] queries) {
            int[] result = new int[A.length];
            for (int i = 0; i < A.length; i++) {
                int col = queries[i][1];
                A[col] = A[col] + queries[i][0];
                result[i] = computeEvenSum(A);
            }
            return result;
        }

        private int computeEvenSum(int[] A) {
            int sum = 0;
            for (int num : A) {
                if (num % 2 == 0) {
                    sum += num;
                }
            }
            return sum;
        }
    }
}

@@ -29,16 +29,42 @@
 tions;%0A%0A
+import java.util.Arrays;%0A%0A
 public c
@@ -111,16 +111,17 @@
 tion1 %7B%0A
+%0A
         
@@ -537,142 +537,59 @@
 m = 
-0;%0A            for (int num : A) %7B%0A                if (num %25 2 == 0) %7B%0A                    sum += num;%0A                %7D%0A            %7D
+Arrays.stream(A).filter(num -%3E num %25 2 == 0).sum();
 %0A   

refactor 985