摘要:
https://leetcode.com/problems/remove-k-digits/ // 参考了这里的 // https://discuss.leetcode.com/topic/59327/o-n-solution/3 public class Solution { public String removeKdigits(String num, int k) { ... 阅读全文
posted @ 2016-09-21 04:05
blcblc
阅读(235)
评论(0)
推荐(0)
摘要:
https://leetcode.com/problems/frog-jump/ // 受以下网页启发,用递归可行 // https://discuss.leetcode.com/topic/59337/easy-version-java public class Solution { Map mp; private int[] stones; public bool... 阅读全文
posted @ 2016-09-21 03:28
blcblc
阅读(433)
评论(0)
推荐(0)
摘要:
https://leetcode.com/problems/nth-digit/ public class Solution { public int findNthDigit(int n) { int k = 9; int b = 1; // 需要加上对b的限制 while (b k*b) { ... 阅读全文
posted @ 2016-09-21 02:11
blcblc
阅读(129)
评论(0)
推荐(0)
摘要:
https://leetcode.com/problems/binary-watch/ // 参考 https://discuss.leetcode.com/topic/59374/simple-python-java // 非常棒的方法 public class Solution { public List readBinaryWatch(int num) { Li... 阅读全文
posted @ 2016-09-21 01:49
blcblc
阅读(181)
评论(0)
推荐(0)
摘要:
https://leetcode.com/problems/elimination-game/ // 一行代码就可以,不过原理有些复杂 // https://discuss.leetcode.com/topic/58042/c-1-line-solution-with-explanation // return n == 1 ? 1 : 2 * (1 + n / 2 - lastRemaini... 阅读全文
posted @ 2016-09-21 01:21
blcblc
阅读(203)
评论(0)
推荐(0)