上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页
摘要: public class Solution { public ArrayList grayCode(int n) { if(n==0){ ArrayList res = new ArrayList(); res.add(0); ... 阅读全文
posted @ 2015-05-22 04:18 世界到处都是小星星 阅读(100) 评论(0) 推荐(0) 编辑
摘要: public class Solution { // you need to treat n as an unsigned value public int hammingWeight(int n) { int res = 0; while(n!=0){ ... 阅读全文
posted @ 2015-05-22 03:48 世界到处都是小星星 阅读(93) 评论(0) 推荐(0) 编辑
摘要: >>是无符号移位public class Solution { // you need treat n as an unsigned value // http://blog.csdn.net/woliuyunyicai/article/details/44198311 publi... 阅读全文
posted @ 2015-05-22 03:41 世界到处都是小星星 阅读(94) 评论(0) 推荐(0) 编辑
摘要: refhttp://bigdata-madesimple.com/decoding-dimensionality-reduction-pca-and-svd/ 阅读全文
posted @ 2015-05-21 06:49 世界到处都是小星星 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 位操作public class Solution { public int rangeBitwiseAnd(int m, int n) { // ref http://www.cnblogs.com/grandyang/p/4431646.html // 位操作运算... 阅读全文
posted @ 2015-05-21 06:05 世界到处都是小星星 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 关键是想清楚每一个课 A 都对应一个neighbor list,即是 A的后续课程 set{b,c,d,...}讲解http://blog.csdn.net/dm_vincent/article/details/7714519每次是剪掉一个“入点”,即non-pre的初始课,然后剪掉它对应的edge... 阅读全文
posted @ 2015-05-20 11:42 世界到处都是小星星 阅读(260) 评论(0) 推荐(0) 编辑
摘要: why list cannot be hash's keyhttps://wiki.python.org/moin/DictionaryKeysLooking up different lists with the same contents would produce different resu... 阅读全文
posted @ 2015-05-19 23:16 世界到处都是小星星 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 开始就想偏了,abcd那些字符根本不用构建,用hashmap一一对应做refhttp://blog.csdn.net/fightforyourdream/article/details/17311575public class Solution { public boolean isIsomo... 阅读全文
posted @ 2015-05-19 22:10 世界到处都是小星星 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 两种做法,都要考虑好结尾处和怎么连接的iterativelyif(head ==null || head.next ==null) return head; ListNode h = new ListNode(-1); h.next = head; Li... 阅读全文
posted @ 2015-05-19 13:18 世界到处都是小星星 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 好久不练手了,注意boolean array default 是falsepublic class Solution { public int countPrimes(int n) { if(n<=2) return 0; boolean[] a = ne... 阅读全文
posted @ 2015-05-19 07:39 世界到处都是小星星 阅读(110) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页