```
public int[] twoSum(int[] numbers, int target) {
HashMap<Integer,Integer> map = new HashMap<Integer, Integer>();
for(int i = 0; i < numbers.length; i++) map.put( numbers[i], i+1);
for(int i = 0; i < numbers.length; i++){
int value = target - numbers[i];
if(map.containsKey(value) && map.get(value) != i+1){
int index = map.get(value) ;
if(i+1 < index) return new int[]{i+1, index};
return new int[]{index, i+1};
}
}
return new int[0];
}
```

}

Feel free to leave comment below as this probably could improve more. The only problem I am not sure with this is that, if the original input is something like [3,3,5] 6, then putting everything into map would result in a map of only two elements with key one 3 and one 5(duplicate 3 removed). Though my solution is accepted. Let me know how you think!