public int maxPoints(Point[] points) {
        Map<Double, Integer> statistic = new HashMap<Double, Integer>();
        int maxNum = 0;
        int duplicate = 1;
        double k = 0.0;
        for(int i=0; i < points.length; i++) {
        	statistic.clear();
        	statistic.put(Double.MIN_VALUE, 0); //itself
        	duplicate = 1;
        	for(int j=0; j < points.length; j++) {
        		if(i == j) continue;
        		
        		if(points[i].x == points[j].x && points[i].y == points[j].y) {
        			duplicate++;
        			continue;
        		}
        		
        		k = getK(points[i], points[j]);
        		
        		if(statistic.containsKey(k)){
        			statistic.put(k, statistic.get(k) + 1);
        		}else{
        			statistic.put(k, 1);
        		}
        	}
        	
        	Collection<Integer> list =statistic.values();
        	for(Integer element : list) {
        		if(element + duplicate > maxNum) {
        			maxNum = element + duplicate;
        		}
        	}
        }
        return maxNum;
    }