T*****8 发帖数: 119 | 1 Given a seria of points (Xi, Yi), find the line containing the highest
number of points from the list.
我反正没有好的方法 | t*********h 发帖数: 941 | 2 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*****8 发帖数: 119 | 3 we can find a solution with O(n^2). Is there a better solution? | l***i 发帖数: 1309 | | m****v 发帖数: 84 | | T*****8 发帖数: 119 | 6 for each pair of nodes, computer (a, b) and save it in harshtable... Count (
a, b) | e***s 发帖数: 799 | 7 就是两两求斜率,放到hashmap计数吗? O(n^2) | l***i 发帖数: 1309 | 8 curious, what is your hash function? And how do you know the number of
collision is O(1) | g*********e 发帖数: 14401 | 9 for each pair, compute y=kx+b -> k, b, hash key is (k,b) pair, hash value is
node(s). | Y**3 发帖数: 21 | |
|