Sum it up. failing 2 testcases

import java.util.*;
public class Main {
static HashMap<String,Boolean> anslist=new HashMap<>();
public static void sumitup(int target,String ans, int[] ar,int lastidxused){
if(target==0){
// if(!anslist.containsKey(ans)){
anslist.put(ans,true);
// System.out.println(ans);
//}
return;
}
for(int i=lastidxused+1;i<ar.length;i++){
if(target>=ar[i]){
sumitup(target-ar[i],ans+ar[i]+" “,ar,i);
}
}
}
public static void main(String args[]) {
Scanner obj=new Scanner(System.in);
int n=obj.nextInt();
int ar[]=new int[n];
for(int i=0;i<n;i++){
ar[i]=obj.nextInt();
}
Arrays.sort(ar);
int target=obj.nextInt();
sumitup(target,”",ar,-1);
Setkeys=anslist.keySet();
List list = new ArrayList(keys);
Collections.sort(list);
for(String s:list){
System.out.println(s);
}
}
}

there are errors in your code . pls write your code on coding blocks ide and share the link here

I am unable to load the question from my account. Every other question and even videos get loaded but not this one

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.