06 2022 档案
摘要:this is java hierarchy framework of collection: it cantains interface and class
阅读全文
摘要:二分法 二分法的模版需要牢牢记:二分法是利用的decrease and conquer is different with divide and conquer 在有序的数组中寻找一个跟target value有关的index或value 比如: less than target 的最大index
阅读全文
摘要:二叉树:递归 平衡二叉树 (左右subtree的height的gap要<=1) BST (Binary Search Tree) in-order 左 根 右的时候为一个ascending的数组。 满二叉树 FullBinaryTree : either 0 nodes or 2 nodes per
阅读全文
摘要:bfs : 树的bfs+图的bfs 总体的思想: 初始化(queue+vistied) 不断的访问队列:每次pop出来队列的一个点 扩展:访问邻居的结点node.neigbors 也就是下一层的结点,符合要求的加入到队列里 作为层层遍历的一种数据结构,第一次找到的点一定是最短的路径。 1.二叉树或者
阅读全文