摘要: public ListNode removeNthFromEnd(ListNode head, int n) { if(head==null) return null; if(n==0)//如果n==0 return h... 阅读全文
posted @ 2015-07-07 22:09 Maydow 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
posted @ 2015-07-07 21:03 Maydow 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 罗马数字 有几条须注意掌握; (1)基本数字Ⅰ、X 、C 中的任何一个,自身连用构成数目,或者放在大数的右边连用构成数目,都不能超过三个;放在大数的左边只能用一个。 (2)不能把基本数字 V 、L 、D 中的任何一个作为小数放在大数的左边采用相减的方法构成数目;放在大数的右边采用相加的方式构成数... 阅读全文
posted @ 2015-07-07 18:57 Maydow 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文
posted @ 2015-07-07 16:19 Maydow 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 两种解法1、将字符串先拼成图 1 public String convert(String s, int numRows) { 2 int l=s.length(); 3 if(l0 && index<s.length();rowIndex--)19 ... 阅读全文
posted @ 2015-07-06 21:29 Maydow 阅读(145) 评论(0) 推荐(0) 编辑
摘要: public static String findLongestOfTheSame(String s1,String s2) { char[] c1=s1.toCharArray(); char[] c2=s2.toCharArray(); int ... 阅读全文
posted @ 2015-07-06 19:07 Maydow 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 当我们需要对代码有更深入的了解的时候,就需要去查看对应生成的字节码,下面是Eclipse 添加 javap功能的步骤 注:当要查看的类中包含内部类时,采用这种方法无法查看内部类,需要在命令行中查看。 1、RUN->External Tools->External Tools Configur... 阅读全文
posted @ 2015-07-06 15:02 Maydow 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1、常见查找,排序的时间复杂度计算 阅读全文
posted @ 2015-07-05 16:21 Maydow 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Q:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters ... 阅读全文
posted @ 2015-07-05 16:00 Maydow 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 1、Rom分区 在Android中,对数据的保护是很严密的。除了放在SD卡中的数据,一个应用所拥有的数据库、文件等内容都是不允许其他应用直接访问的,这一部分数据都是在/data/data里面。 这里所说的SD卡是逻辑上的SD卡,比如我现在用的galaxy s4 的Rom是16g,Android系... 阅读全文
posted @ 2015-06-28 14:45 Maydow 阅读(1443) 评论(0) 推荐(0) 编辑