阿里
- 介绍项目
- 介绍并发模式
- 如何实现并发
- 定时器如何实现,为什么要用双链表,单链表就够了
- 有限状态机,为什么要用,为什么用主从状态机
- 如何优化定时器
- 有参考开源项目吗
- new 一个对象到销毁,操作系统做了什么
- 继承中构造函数的调用顺序,为什么要这么设计
- 如何遍历二叉树(应该问问目的。。。)
字节一面
- 介绍项目
- 问异步日志的写线程什么时候刷新缓冲区,答每写一次都要刷新,面试官提示这个日志系统异步并没有提高性能,还是消耗了 CPU 资源
- 多继承虚表
- TCP 为什么要握手
- 匹配子串
字节二面
- 如何实现线程安全hash_map
- 如何实现多进程下的hash_map
- 进程线程区别
- 进程间通信方式
- 2000万学生数据排序,要求由姓名检索排名
- 一面算法题有没有更优解
- 带随机指针的链表深拷贝
- 概率题,AB胜率相等,A赢两回合获胜,B赢三回合获胜,A的胜率
字节第二次一面
- 如何理解虚拟内存
- 什么时候使用类方法和类实例方法
- 从源码到可执行文件的过程
- 说说服务器项目的特点,与成熟框架相比有什么特色(答只是练手的,希望把技巧搞懂了再用上)
- 那你学到了什么
- 代码:链表表示的十进制数相加
字节第二次二面
- 说说你的深度学习除草机项目
- 哪几个模块,如何实现
- 项目指标是什么,指标没达到要求可能是什么问题,如何排查,除了控制变量还有什么方法
- 服务器项目,假设校园网,上万学生同时选课,怎么保证不挂掉(我说没有请求大文件,应该不会挂掉。。。)
- 你是怎么限制连接数的,连接数受限的因素有哪些,为什么限制,超过连接数客户端接收到什么,服务器如何处理?
- 连接重置的HTTP状态码是什么?(我提出疑惑说这是TCP的,他说这是他故意挖坑)
- 算法:螺旋矩阵2,写太慢被催了。。。
字节第三次一面挂(测开)
- 自我介绍
- 讲讲印象最深的项目
- 讲讲web服务器,为什么要做,期望达到什么样的效果
- HTTP GET POST 区别
- 平时使用什么语言,C++ 中堆栈在内存管理上的区别
- 进程线程区别、线程同步的方式、信号量和自旋锁的区别
- 计算机网络,OSI 七层模型,路由器和交换机工作在哪一层
路由器工作在网络层,根据 IP 地址寻址,交换机工作在数据链路层,根据 MAC 地址寻址; - TCP 和 UDP 的区别在哪里,应用场景
- DNS 熟悉吗,说说工作原理,DNS 使用 TCP 还是 UDP
- 讲讲 TCP 拥塞控制算法
- 数据库???我说不会,问我事务四大特性,分别解释
- 什么是脏读,什么是幻读,有什么区别
- 最常用的 app 是什么,如何设计微信电话的测试用例???
- 白盒黑盒知道吗?
- 两个升序数组,找所有元素中位数,要求时间复杂度 $O(log(m + n))$