Skip to content

Commit 0436dd2

Browse files
authored
Update 1947-maximum-compatibility-score-sum.js
1 parent 9c461a9 commit 0436dd2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

1947-maximum-compatibility-score-sum.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ const maxCompatibilitySum = function(students, mentors) {
4040
*/
4141
const maxCompatibilitySum = function(students, mentors) {
4242
const obj = { res: 0 }, hash = {}
43-
for(let i = 0, n = students.length; i < n; i++) {
44-
bt(students, mentors, 0, 0, obj, hash)
45-
}
43+
bt(students, mentors, 0, 0, obj, hash)
44+
4645
return obj.res
4746
};
4847

@@ -51,7 +50,6 @@ function bt(stu, men, i, score, obj, hash) {
5150
if(i === stu.length) {
5251
if(score > obj.res) {
5352
obj.res = score
54-
// console.log(hash)
5553
}
5654
return
5755
}

0 commit comments

Comments
 (0)