![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hash
旻宇
New Acmer
展开
-
LeetCode #202 Happy Number
Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares o原创 2015-08-09 13:10:49 · 406 阅读 · 0 评论 -
LeetCode # 149 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. 本题有点戏剧性,在本地测试代码的时候,答案并不正确,经过很长时间反复排查逻辑后提交竟然AC了,估计是我GCC-C++版本浮点型计算的精度问题。 class Solution { pub原创 2015-08-02 22:19:34 · 393 阅读 · 0 评论