You are viewing a single comment's thread. Return to all comments →
List<Integer> temp; List<Integer> res=new ArrayList<>(); for(int i=1;i<arr.size();i++){ temp=arr.subList(i,arr.size()); if(temp.indexOf(m-arr.get(i-1))!=-1){ res.add(i); res.add(temp.indexOf(m-arr.get(i-1))+i+1); return res; } } return res;
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →