上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: Type argument cannot be primitive type ~~HashMap<Integer,boolean> hashMap = new HashMap<Integer, boolean>();~~ it should use Boolean instead of boolea 阅读全文
posted @ 2022-07-14 18:17 奋斗中的菲比 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2022-07-13 15:44 奋斗中的菲比 阅读(21) 评论(0) 推荐(0) 编辑
摘要: Trie: 前缀树 递归:如果每一层循环的内容都是一样的操作,那么可以用递归。 阅读全文
posted @ 2022-07-06 14:16 奋斗中的菲比 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 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; 阅读全文
posted @ 2022-07-06 13:20 奋斗中的菲比 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2022-07-01 20:55 奋斗中的菲比 阅读(18) 评论(0) 推荐(0) 编辑
摘要: this is java hierarchy framework of collection: it cantains interface and class 阅读全文
posted @ 2022-06-30 22:29 奋斗中的菲比 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 二分法 二分法的模版需要牢牢记:二分法是利用的decrease and conquer is different with divide and conquer 在有序的数组中寻找一个跟target value有关的index或value 比如: less than target 的最大index 阅读全文
posted @ 2022-06-30 22:20 奋斗中的菲比 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 二叉树:递归 平衡二叉树 (左右subtree的height的gap要<=1) BST (Binary Search Tree) in-order 左 根 右的时候为一个ascending的数组。 满二叉树 FullBinaryTree : either 0 nodes or 2 nodes per 阅读全文
posted @ 2022-06-30 19:16 奋斗中的菲比 阅读(20) 评论(0) 推荐(0) 编辑
摘要: bfs : 树的bfs+图的bfs 总体的思想: 初始化(queue+vistied) 不断的访问队列:每次pop出来队列的一个点 扩展:访问邻居的结点node.neigbors 也就是下一层的结点,符合要求的加入到队列里 作为层层遍历的一种数据结构,第一次找到的点一定是最短的路径。 1.二叉树或者 阅读全文
posted @ 2022-06-28 17:15 奋斗中的菲比 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 2. Image Retrieval 主要提出了一种从粗糙到细致的检索方案(coarse-to-fine)。H层首先被二值化: 粗糙检索是用H层的二分哈希码,相似性用hamming距离衡量。待检索图像设为I,将I和所有的图像的对应H层编码进行比对后,选择出hamming距离小于一个阈值的m个构成一个 阅读全文
posted @ 2021-12-23 09:40 奋斗中的菲比 阅读(202) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页