摘要:
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 ... 阅读全文
摘要:
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 阅读全文