猿辅导一面凉经


  1. 项目介绍
  2. SpringBoot 自动配置原理
  3. SpringCloud中Eureka服务注册中心和Zuul网关的原理
  4. 数据库的隔离级别,如何实现可重复读
  5. 数据库的索引有哪些,介绍B+树索引
  6. Redis的线程模型,常用的数据结构
  7. RabbitMQ的消息模型
编程题:leetcode695 岛屿的最大面积
class Solution {
    public int maxAreaOfIsland(int[][] grid) {
        int row = grid.length;
        if (row == 0){
            return 0;
        }
        int col = grid[0].length;
        int result = 0;
        for (int i = 0; i < row; i++) {
            for (int j = 0; j < col; j++) {
                if (grid[i][j] == 1){
                    result = Math.max(result, dfs(grid,i,j));
                }
            }
        }
        return result;
    }

    private int dfs(int[][] grid, int i, int j) {
        if (i < 0 || i == grid.length || j < 0 || j == grid[0].length || grid[i][j] == 0){
            return 0;
        }
        grid[i][j] = 0;
        return dfs(grid, i - 1, j) + dfs(grid, i + 1, j) + dfs(grid, i, j - 1) + dfs(grid, i, j + 1) + 1;
    }
}
编程题:一个栈中存放无序数字,使用额外空间栈对其进行排序
public class Solution {

    public Stack<Integer> sort(Stack<Integer> stack){
        Stack<Integer> s2 = new Stack<>();
        int temp;
        while (!stack.isEmpty()){
            temp = stack.pop();
            while (!s2.isEmpty() && s2.peek() > temp){
                stack.push(s2.pop());
            }
            s2.push(temp);
        }
        return s2;
    }
}
-----------------------------------------------反问
技术栈是否匹配
面试评价(面试官只说了一句话:代码要写的简洁)

透心凉~~~~~~~~~~~~~~~~~~~~~~~


#猿辅导##笔试题目#
全部评论
你面试时写这代码还不够简洁吗?面试那有时间想那么多
点赞 回复
分享
发布于 2019-08-19 11:29
第一题***了吗,挺厉害的 楼主SpringCloud是怎么自学的?诚心求方法
点赞 回复
分享
发布于 2020-08-24 12:19
小红书
校招火热招聘中
官网直投
猿辅导是真的难,笔试就看出来了
点赞 回复
分享
发布于 2020-08-24 12:44

相关推荐

1 24 评论
分享
牛客网
牛客企业服务