会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
JessiaDing
博客园
首页
新随笔
联系
订阅
管理
2014年5月7日
Leetcode:Max Points on a Line
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 解题想法: 其实判断一个直线上最好的方法是判断斜率。如果在同一直线上,那么直线上一点与其他点的斜率相同。刚开始的时候利用hashmap记录下了所有相同斜率的点。但是有一点需要注意的是,有时只是平行...
阅读全文
posted @ 2014-05-07 16:14 JessiaDing
阅读(126)
评论(0)
推荐(0)
编辑