C is so fast that take 5ms while java take 234ms

```
int *twoSum(int numbers[], int n, int target) {
int array[100000] = {-1};
int temp = 0;
int i = 0;
static int result[2];
for(i = 0; i < n; i++)
{
array[numbers[i] + 5000] = i;
}
for(i = 0; i < n; i++)
{
temp = array[target - numbers[i] + 5000];
if(temp)
if(temp > i)
{
result[0] = i + 1;
result[1] = temp + 1;
break;
}
}
return result;
}
```

while use java to solve this problem, i try several way to dispose of it, below is my thinking:

first i use double for to ergodic the array, but time limited it takes O(n2)

second i use quicksort and binsch to help , but still limited it takes O(nlgn)

third i use Hashmap instead, it is ok to solve this, but still not to satisfy

so the fourth is

```
public class Solution {
public int[] twoSum(int[] numbers, int target) {
int array[] = new int[100000];
int temp = 0;
for(int i = 0; i < numbers.length; i++)
{
array[numbers[i] + 5000] = i;
}
for(int i = 0; i < numbers.length; i++)
{
temp = array[target - numbers[i] + 5000];
if(temp > 0 && temp > i)
return new int[]{i + 1, temp + 1};
}
return null;
}
}
```