From 35023c59947f11ed789c7ea32037dd793240f7a8 Mon Sep 17 00:00:00 2001 From: Jerry-306 <82520819+Jerry-306@users.noreply.github.com> Date: Tue, 14 Sep 2021 20:09:16 +0800 Subject: [PATCH] =?UTF-8?q?Update=200494.=E7=9B=AE=E6=A0=87=E5=92=8C.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0494.目标和.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0494.目标和.md b/problems/0494.目标和.md index 4993bede..07cf0433 100644 --- a/problems/0494.目标和.md +++ b/problems/0494.目标和.md @@ -321,7 +321,7 @@ const findTargetSumWays = (nums, target) => { const sum = nums.reduce((a, b) => a+b); - if(target > sum) { + if(Math.abs(target) > sum) { return 0; }