mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-10 12:15:58 +08:00
@ -321,7 +321,7 @@ const findTargetSumWays = (nums, target) => {
|
|||||||
|
|
||||||
const sum = nums.reduce((a, b) => a+b);
|
const sum = nums.reduce((a, b) => a+b);
|
||||||
|
|
||||||
if(target > sum) {
|
if(Math.abs(target) > sum) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user