摘要: 直接两个点确定一条直线。然后两两组合,再写一个看过多少个点的函数。一直更新max就行。import java.util.Arrays;public class Solution { public static void main(String[] args){ Point[] a... 阅读全文
posted @ 2015-12-30 21:11 仔细思考一切 阅读(251) 评论(0) 推荐(0)
摘要: 最主要的思路:1,这条直线就是要把两个正方形的中点链接。2,注意的特殊情况:中心点重合。答案:public class Solution { public static void main(String[] args){ Point[] a = {new Point(13... 阅读全文
posted @ 2015-12-30 14:28 仔细思考一切 阅读(232) 评论(0) 推荐(0)
摘要: leetcode原题:char temp ; Stack stack = new Stack();//error:Stack stack = new Stack(); //思路,因为他要的是顺序要对。所以我先把(,[,{的存入栈,遇到反向的时候看一下最近的一个是不是他的配... 阅读全文
posted @ 2015-12-30 10:57 仔细思考一切 阅读(251) 评论(0) 推荐(0)
摘要: 1,这个是自己写的。一直LTE。 public static ArrayList getPerms(String str) { if (str == null) { return null; } ArrayList permuta... 阅读全文
posted @ 2015-12-30 10:49 仔细思考一切 阅读(254) 评论(0) 推荐(0)