Skip to content

Commit 0915611

Browse files
authored
Update PartitionProblem[ReturnBoolean].java
1 parent fc35fcf commit 0915611

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

DynamicProgramming/PartitionProblem/PartitionProblem[ReturnBoolean].java

+1-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public boolean isPartition(int A[], int sum, int n){
108108
*/
109109

110110
//RECUSRION USING MEMOIZATION
111-
//The below approach uses array's suffixes
112111

113112
public boolean isPartition(int A[], int current, int sum, HashMap<String,Boolean> map){
114113

@@ -142,7 +141,7 @@ public boolean solvePartition(int A[]){
142141
//partition not possible
143142
if(sum % 2 != 0) return false;
144143

145-
else return isPartition(A,sum/2,n);
144+
else return isPartition(A, n, sum/2, map);
146145
}
147146

148147
/*

0 commit comments

Comments
 (0)