LeetCode
hahazhouzhiqin
这个作者很懒,什么都没留下…
展开
-
#LeetCode Max Points On A Line
public class Solution { public int maxPoints(Point[] points) { if (points.length == 0) return 0; if (points.length == 1) return 1; int maxP = 0;原创 2014-04-06 20:55:05 · 383 阅读 · 0 评论 -
#LeetCode ZigZag Conversion
public class ZigZagConversion { public String convert(String s, int nRows) { if (nRows == 1) return s; String result = new String(); int n = 0; while (n <原创 2014-04-06 20:37:44 · 377 阅读 · 0 评论 -
#LeetCode 3Sum
class Solution {public: vector > threeSum(vector &num) { vector > result; if(num.size() < 3) return result; sort(num.begin(), num.end()); for(int i = 0; i < num.size()-2; ) { in原创 2014-05-26 17:45:00 · 320 阅读 · 0 评论