庄泽波の博客

好记性不如烂笔头

2014年9月20日 #

leetcode - [4]Sort List

摘要: Sort a linked list inO(nlogn) time using constant space complexity.思路:采用归并排序或者快速排序#include using namespace std;struct ListNode { int val; ListNo... 阅读全文

posted @ 2014-09-20 18:55 庄泽波 阅读(163) 评论(0) 推荐(0)

leetcode-[3]Max Points on a Line

摘要: Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line思路:最多的点,必然是点连成线时,所有斜率相同的最多的组合情况; 那么如果不在同一直线点的组合也可能斜率... 阅读全文

posted @ 2014-09-20 01:25 庄泽波 阅读(167) 评论(0) 推荐(0)

leetcode - [2]Evaluate Reverse Polish Notation

摘要: Evaluate Reverse Polish NotationTotal Accepted:24595Total Submissions:123794My SubmissionsEvaluate the value of an arithmetic expression inReverse Pol... 阅读全文

posted @ 2014-09-20 00:16 庄泽波 阅读(153) 评论(0) 推荐(0)

导航