上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页
摘要: https://leetcode.com/problems/next-permutation/discuss/13865/Sharing-my-clean-and-easy-understand-java-code-with-explanation?page=3 在当前序列中,从尾端往前寻找两个相邻 阅读全文
posted @ 2018-09-08 07:51 jasoncool1 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public int divide(int dividend, int divisor) { 3 long count = 0; 4 if(dividend == 0) return 0; 5 //divisor和dividend都要变成正数和long再进行处理 6 if... 阅读全文
posted @ 2018-09-08 05:34 jasoncool1 阅读(115) 评论(0) 推荐(0) 编辑
摘要: String相等 == 只是比较引用值就是地址如果是new String的话 例如substring跟其他的比较就要用str.equal() 阅读全文
posted @ 2018-09-07 23:06 jasoncool1 阅读(170) 评论(0) 推荐(0) 编辑
摘要: easy 阅读全文
posted @ 2018-09-07 22:44 jasoncool1 阅读(98) 评论(0) 推荐(0) 编辑
摘要: reverse都是两个记录要交换的 一个记录之前的 corner:null 有一个 有两个 阅读全文
posted @ 2018-09-07 21:53 jasoncool1 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 别想复杂 就一个记录标的 一个记录要对比的 阅读全文
posted @ 2018-09-06 22:07 jasoncool1 阅读(115) 评论(0) 推荐(0) 编辑
摘要: backtrack 再熟悉一下 阅读全文
posted @ 2018-09-06 21:32 jasoncool1 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 不一定都要用StringBuilder 可能用String更方便https://leetcode.com/problems/letter-combinations-of-a-phone-number/discuss/8118/Easy-understand-Java-Solution 阅读全文
posted @ 2018-09-06 11:32 jasoncool1 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 注意标准设定的大小不能超过Integer.MAX_VALUE 阅读全文
posted @ 2018-09-06 10:15 jasoncool1 阅读(91) 评论(0) 推荐(0) 编辑
摘要: substring要是取不到东西不会返回"" 而是什么都不返回,所以不能用== "" 判断 要用长度来判断。 阅读全文
posted @ 2018-09-06 09:11 jasoncool1 阅读(96) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页