摘要: Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.Analysis: This approach cost time complexity O(n^3). 1. If points less than 2 or all points locate at the same position, just output the points number. 2. Find two points with different coordinates ... 阅读全文
posted @ 2013-12-13 14:36 WinsCoder 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expression.Some examples: ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ["4", "13&qu 阅读全文
posted @ 2013-12-13 04:02 WinsCoder 阅读(156) 评论(0) 推荐(0) 编辑