public int[] twoSum(int[] numbers, int target) 
    {
        int[] results = new int[2];
        HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();
        for(int i=0;i<numbers.length;i++)
            hm.put(target-numbers[i], i+1);
        for(int i=0;i<numbers.length;i++)
            if(hm.get(numbers[i])!=null)
            {
                results[1] = hm.get(numbers[i]); 
                results[0] = i+1;
                return results;
            } 
        return null;
    }