4
public int maxCompatibilitySum(int[][] students, int[][] mentors) {5
boolean[] visited = new boolean[students.length];6
helper(visited, students, mentors, 0, 0);10
public void helper(boolean[] visited, int[][] students, int[][] mentors, int pos, int score) {11
if (pos >= students.length) {12
max = Math.max(max, score);15
for (int i = 0; i < mentors.length; i++)18
helper(visited, students, mentors, pos + 1, score + score(students[pos], mentors[i]));23
public int score(int[] a, int[] b) {26
for (int i = 0; i < b.length; i++) if (a[i] == b[i]) count += 1;