摘要:
Note: 1. Very smart way of calculating how many difference from bits: https://en.wikipedia.org/wiki/Hamming_distance#Algorithm_example 2. Another way 阅读全文
摘要:
Note: 1. Remember to intial (0, -1) since this kind of problems need a starting point. 阅读全文
摘要:
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. 阅读全文
摘要:
public class Codec { private long id; private Map urlMap; private final String elements = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; public Codec() { ... 阅读全文
摘要:
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { pri... 阅读全文
摘要:
The largest number could be n of walls. 阅读全文
摘要:
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { pub... 阅读全文