摘要: 今天手残,碰了一道leetcode HARD难度题目,果然来着不善,花了不少时间,题目很简单,求平面内一些离散点中,最大共线点的数量。最直接的思路就是通过斜率判断,但是考虑到斜率很可能是小数,比较小数的大小会有误差,因此我们不做除法,取横纵坐标差值的最大公约数,然后横纵坐标分别除以最大公约数即可,这 阅读全文
posted @ 2018-04-03 22:05 皇家大鹏鹏 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2018-04-03 15:39 皇家大鹏鹏 阅读(137) 评论(0) 推荐(0) 编辑