From 93cee09e995e5bb6d870ef86fb6ffe2330c947fc Mon Sep 17 00:00:00 2001 From: NorthernBrain Date: Mon, 31 Aug 2020 18:36:38 +0800 Subject: [PATCH] Modify to prevent memory leaks. --- DynamicProgramming/MinimumSumPartition.java | 1 + 1 file changed, 1 insertion(+) diff --git a/DynamicProgramming/MinimumSumPartition.java b/DynamicProgramming/MinimumSumPartition.java index 9cbfe7ec..18668e73 100644 --- a/DynamicProgramming/MinimumSumPartition.java +++ b/DynamicProgramming/MinimumSumPartition.java @@ -41,6 +41,7 @@ public class MinimumSumPartition min = Math.min(min,(sum-2*ans[i])); System.out.println(min); } + sc.close(); } static int[] subset(int arr[],int sum) {