I can not show the screenshot , I'll just describe it.

the test case is {3,2,4} 6

my output is 2,3

but it gives me the judgement "Wrong Answer".

I wonder what's going on?

```
public class Solution {
public int[] twoSum(int[] nums, int target) {
List<Integer> list = new ArrayList<Integer>();
HashMap<Integer,Integer> hm = new HashMap<Integer,Integer>();
int length = nums.length;
for(int i=0;i<length;i++){
list.add(nums[i]);
hm.put(nums[i], i+1);
}
Collections.sort(list);
int find=-1;
for(int i=0;i<length;i++){
if((find = getItem(list,target-nums[i])) != -1 ){
if(nums[i]!=list.get(find)){
System.out.println(hm.get(nums[i])+","+hm.get(list.get(find)));
break;
}
}
}
return nums;
}
private int getItem(List<Integer> list, int tar) {
int be = 0,en = list.size()-1;
int mid = -1;
while(be<=en){
mid = be + (en-be)/2;
if(tar == list.get(mid)) {
return mid;
} else {
if(tar > list.get(mid)){
be = mid + 1;
} else {
en = mid - 1;
}
}
}
if(be > en){
return -1;
}
if(tar == list.get(be)){
return be;
} else {
return -1;
}
}
```

}