摘要:
Type argument cannot be primitive type ~~HashMap<Integer,boolean> hashMap = new HashMap<Integer, boolean>();~~ it should use Boolean instead of boolea 阅读全文
摘要:
Approach 4: Using Hashmap Algorithm The idea behind this approach is as follows: If the cumulative sum(represented by sum[i]sum[i] for sum up to i^{th 阅读全文
摘要:
Note: String objects are stored in a special memory area known as the "string constant pool". features - immutable str is a string make string sorted; 阅读全文
摘要:
you can't initialize array like this way: public static final String dic[4] = {"33","3","4","5"}; I don't know why you can't assign the length of the 阅读全文
摘要:
二分法 二分法的模版需要牢牢记:二分法是利用的decrease and conquer is different with divide and conquer 在有序的数组中寻找一个跟target value有关的index或value 比如: less than target 的最大index 阅读全文