Advertisement
rajeshinternshala

Untitled

Oct 17th, 2023
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1.  boolean[] solve(int a[], char signs[], int b[], int[] c) {
  2.         boolean ans[] = new boolean[a.length];
  3.         for (int i = 0; i < a.length; i++) {
  4.             if (signs[i] == '+') {
  5.                 ans[i] = a[i] + b[i] == c[i];
  6.             } else {
  7.                 ans[i] = a[i] - b[i] == c[i];
  8.             }
  9.         }
  10.         return ans;
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement