求个父母赴美亲属关系公证书模板# Reunion - 探亲与陪读z*g2015-06-25 07:061 楼Given a two dimensional graph with 6000 points on it, find a line whichpasses the most number of points。谢谢了。
l*r2015-06-25 07:063 楼hashtable, n^2..【在 z**********g 的大作中提到】: Given a two dimensional graph with 6000 points on it, find a line which: passes the most number of points。: 谢谢了。
m*g2015-06-25 07:065 楼好像据说for each point, calculate and hash the angle of any other point.count the max on the same angle.so O(n2)
r*o2015-06-25 07:066 楼how do you define the angle? slope? it is float.【在 m*****g 的大作中提到】: 好像据说for each point, calculate and hash the angle of any other point.: count the max on the same angle.: so O(n2)
a*92015-06-25 07:067 楼这题好像本版见过。就是对每两个点算slope和intersect,然后sort.如果允许误差就直接把float sort,否则用分数表示。。【在 z**********g 的大作中提到】: Given a two dimensional graph with 6000 points on it, find a line which: passes the most number of points。: 谢谢了。
r*o2015-06-25 07:068 楼请问sort是对slope进行sort吗?【在 a***9 的大作中提到】: 这题好像本版见过。: 就是对每两个点算slope和intersect,然后sort.: 如果允许误差就直接把float sort,否则用分数表示。。
r*o2015-06-25 07:0610 楼那是先对slope sort, 如果一样(误差小于给定值)再对intersect sort?【在 a***9 的大作中提到】: 呃。。那还算intersect干嘛
a*92015-06-25 07:0613 楼不是说好于O(n^3)就行了吗。。我不知道能不能用hash,总觉得hash这种东西对算法题上比较扯。。大概可以跟recruiter聊一聊是真的。。【在 r****o 的大作中提到】: 那复杂度是O(n^2lgn). 这题是不是不能用hash?