- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 BeanFactory注释中,关于Bean生命周期的说明
* <p>Bean factory implementations should support the standard bean lifecycle interfaces * as far as possible. The full set of initialization methods and their standard order is: * <ol> * <li>BeanNameAware's {@code setBeanName} * <.
2021-06-12 21:00:20
120
原创 【算法】从前序与中序遍历序列构造二叉树
从前序与中序遍历序列构造二叉树 题目 思路 二叉树相关的题目一般会马上想到递归 这里也一样,分别递归重建获得二叉树 重点:找到中序遍历中根节点位置的索引 重点api: Arrays.copyOfRange(preorder, x , y);// copy的是一个左开右闭的区间 [x,y) 代码 class Solution { public TreeNode buildTree(int[] preorder, int[] inorder) { if(preorder == nu
2021-04-24 09:52:05
102
原创 【算法】螺旋矩阵
LeetCode-螺旋矩阵 题目 思路 核心: 用数组 dx/dy(direction of X/Y) 记录坐标x,y在移动的过程中的变化量 int[] dx = {0,1,0,-1}; int[] dy = {1,0,-1,0}; 用一个二维数组 visited 来记录当前坐标是否已经被访问过 代码 class Solution { public List<Integer> spiralOrder(int[][] matrix) { int m = mat
2021-04-24 08:31:01
141
原创 【SpringBoot】解读@SpringBootApplication
SpringBootApplication注解解析 @SpringBootApplication 其实是由三个注解组成的 SpringBootConfiguration EnableAutoConfiguration ComponentScan @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(excludeFilters = {@Filter(type = FilterType.CUSTOM,classes = {Type
2021-04-21 21:12:41
460
2
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人