public int maxPoints(Point[] points) {
    		int len=points.length;
    		HashMap<Float,Integer> map=new HashMap<Float,Integer>();
    		int max=0;
    		for(int i=0;i<len;i++){
    			map.clear();
    			map.put(Float.MIN_VALUE, 0);
    			int duplicate=1;
    			for(int j=0;j<len;j++){
    				if(j==i){
    					continue;
    				}
    				if(points[i].x==points[j].x&&points[i].y==points[j].y){
    					duplicate++;
    					continue;
    				}
    				float k=points[i].x==points[j].x?Float.MIN_VALUE:(float)(points[j].y - points[i].y)/(points[j].x - points[i].x);
    				map.put(k, map.get(k)==null?1:map.get(k)+1);
    			}
    			for(float key:map.keySet()){
    				if(map.get(key)+duplicate>max){
    					max=map.get(key)+duplicate;
    				}
    			}
    		}
        return max;
    }