上一页 1 2 3 4 5 6 7 8 9 10 ··· 36 下一页
摘要: Note: 1. Very smart way of calculating how many difference from bits: https://en.wikipedia.org/wiki/Hamming_distance#Algorithm_example 2. Another way 阅读全文
posted @ 2017-09-03 16:15 keepshuatishuati 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Note: 1. Remember to intial (0, -1) since this kind of problems need a starting point. 阅读全文
posted @ 2017-09-03 16:02 keepshuatishuati 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Note: 1. The sum array need to be very clear that 0th is 0. So the sum[i] means from 0 to i - 1 sum. 阅读全文
posted @ 2017-09-03 13:12 keepshuatishuati 阅读(73) 评论(0) 推荐(0) 编辑
摘要: public class Codec { private long id; private Map urlMap; private final String elements = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; public Codec() { ... 阅读全文
posted @ 2017-09-03 12:51 keepshuatishuati 阅读(96) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { pri... 阅读全文
posted @ 2017-09-03 07:29 keepshuatishuati 阅读(71) 评论(0) 推荐(0) 编辑
摘要: The largest number could be n of walls. 阅读全文
posted @ 2017-09-03 07:16 keepshuatishuati 阅读(146) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { pub... 阅读全文
posted @ 2017-09-03 06:31 keepshuatishuati 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Edge case: need to determine whether two numbers come from same node. 阅读全文
posted @ 2017-09-01 14:26 keepshuatishuati 阅读(81) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { p... 阅读全文
posted @ 2017-08-31 16:13 keepshuatishuati 阅读(155) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */ class Solution { public boolean isPalindrom... 阅读全文
posted @ 2017-08-31 16:01 keepshuatishuati 阅读(110) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 36 下一页