问一个Google Interview问题# JobHunting - 待字闺中T*82012-11-30 08:111 楼Given a seria of points (Xi, Yi), find the line containing the highestnumber of points from the list.我反正没有好的方法
t*h2012-11-30 08:112 楼O(n^2)?【在 T*****8 的大作中提到】: Given a seria of points (Xi, Yi), find the line containing the highest: number of points from the list.: 我反正没有好的方法
T*82012-11-30 08:116 楼for each pair of nodes, computer (a, b) and save it in harshtable... Count (a, b)
l*i2012-11-30 08:118 楼curious, what is your hash function? And how do you know the number ofcollision is O(1)
g*e2012-11-30 08:119 楼for each pair, compute y=kx+b -> k, b, hash key is (k,b) pair, hash value isnode(s).