summaryTemp
体会
首先十分感谢快手一面,春招的第一家面试,给哥们给足了整个三个月的自信心,到现在回看才发现当时的回答有多么的傻逼,但是,七战快手也是没谁了,大工当代孟获哈哈哈
对于基础知识还是准备的不扎实,由于项目的起手难度确实稍微高了一些,直接开始微服务,到五月份才开始意识到了分布式知识的重要性,开始进行准备分布式,但是发现准备的稍微还是有点不充足
infj真的不得不说是一个神奇的人格,e人面前变i,i人面前无敌,整个嘴巴拉巴拉基本上没停过,面试体验最好的还是58,不得不说,体验拉满,给出了很多宝贵的建议
内耗的时候真内耗,两个月每天睡五个小时,搞得现在每天五点钟醒已经成本能反应了,难受
多准备复盘,现在不知不觉复盘已经写了30000字了,亏贼,吓人
关注一手,想起来随时更新……ಥ_ಥ
投递情况呜呜呜,掉小珍珠了,投了六百家,北上大概投了五百家,结果兜兜转转还是回西安了,宿命论,出不了西北了实习中大厂投递
面试经验复盘总的来说,还是十分感谢快手让我在整个最难熬的四五月份活了过来,每天投快手,挂快手,咱们秋招见9000字的面试复盘真的不准备打赏一下吗,QAQ(┬┬﹏┬┬)实习中大厂面试复盘&a ...
internshipReview
快手(海外电商)快手一面(4.8)
你是如何进行考虑你的项目的?你为什么要想着写这样的两个项目,你学校学过java吗,如何进行学习的
阿巴阿巴……
来考察一下你的java的基础知识吧,如果我们对于一个Map的结构进行插入会发现十分的慢?这是为什么?
map的实现是由数组+链表完成,因此会进行O(n)的插入操作,分开将jdk1.8之前和之后
如果你进行优化你会如何进行优化
开始头脑风暴…..首先我想的是将传统的拉链法进行优化,我们可以优化成地址探测法加拉链法……(看得出不太满意,现在复盘发现有点离谱)
这样会导致什么问题?
如果我们进行插入的时候我们会发现要不断的进行数组的扩容
除了对于数组进行操作,我们还可以进行什么操作(面试官tip: 从链表的结构,我们不用转化成红黑树)
继续头脑风暴…..用redis中的跳表,给索引构建索引
还行,你讲一下跳表和红黑树,为什么redis要使用跳表而不使用红黑树,红黑树的开销问题
吟唱失败,(从redis的使用场景进行考虑),redis主要是用作内存,因此从插入的角度来进行考虑,如果使用插入的范围比较范围比较小的话我觉得跳表的开销可能小于 ...
internship
公司名
投递岗位
投递时间
测评
笔试
一面
二面
情况
状态
Base
快手
后端
3/27
√
4/8(√)
4/10(×)
后端挂
已结束
北京
百度
后端
3/27
简历挂
泡池子
北京
58同城
后端
3/28
泡池子
北京
阿里淘天
后端(测开)
3/31
√
√
后端挂 测开挂
已结束
杭州
美团
后端(测开)
3/31
√
√
4/11(√) 5/07(×)
4/12(×)
后端挂 测开挂 复活挂
已结束
北京
腾讯
后端
3/31
√
4/23(×)
已结束
深圳
携程
后端
3/31
√
笔试挂
进池子
北京
字节
后端(测开)
3/31
泡池子
北京
北森
后端
3/31
×
测评未做
北京
京东
后端
3/31
√
√
泡池子
北京
华为
后端
3/31
√
√
已结束
西安
...
hot30
前k个高频元素1234567891011121314151617181920212223242526import java.util.HashMap;import java.util.Map;import java.util.PriorityQueue;class Solution { public int[] topKFrequent(int[] nums, int k) { int[] ans = new int[k]; HashMap<Integer,Integer> map = new HashMap<>(); for(int num : nums){ map.put(num,map.getOrDefault(num,0) + 1); } PriorityQueue<Map.Entry<Integer,Integer>> minHeap = new PriorityQueue<>( ...
sqlStudy
MySQL什么是Master-Slave协议?MySQL的复制(replication)功能是支持主从复制的,主从复制是指将主数据库的DDL和DML操作通过二进制日志(binary log)传到从数据库上,然后在从数据库上对这些日志重新执行(也叫重做),从而使得从数据库的数据与主数据库的数据保持一致。
下面是 MySQL Master-Slave 复制的基本工作流程:
主服务器记录数据更改:当主服务器上的数据库发生数据更改(如插入、更新、删除操作)时,MySQL 会将这些更改记录到二进制日志(binlog)中。
从服务器连接主服务器:从服务器通过与主服务器建立连接,并发送一个请求,告知主服务器它要开始复制数据了。
主服务器发送数据:一旦从服务器与主服务器建立了连接并发送了复制请求,主服务器会将自己的二进制日志文件传送给从服务器。
从服务器应用数据更改:从服务器接收到主服务器的二进制日志后,会将其中的数据更改逐条应用到自己的数据库中,从而使得自己的数据与主服务器保持同步。
MySQL 的 Master-Slave 复制协议具有以下特点和优势:
高可用性和容错性:通过将数据复制到多个从 ...
Array
数组二分查找123456789101112131415161718class Solution { public int search(int[] nums, int target) { int start = 0; int end = nums.length-1; int mid = 0; while(start<=end){ mid = (start+end)/2; if(nums[mid]==target){ return mid; }else if(nums[mid]>target){ end = mid - 1; }else if(nums[mid]<target){ start = mid + 1; } ...
FeignAndHystrix
Feign:
Feign 是一个声明式的 HTTP 客户端,它使得编写 HTTP 客户端变得更加简单和优雅。通过 Feign,开发者可以使用注解的方式来定义 HTTP 请求的参数、路径、方法等信息,而无需手动编写 HTTP 请求的代码。
Feign 可以与 Spring Cloud 中的服务发现组件(如 Eureka)集成,使得微服务之间的调用更加方便和透明。使用feign可以实现微服务之间的调用,
Feign 是一个很好的微服务间通信的工具,但在复杂的网络环境下,如果发生故障,可能会导致调用失败。这时候就需要一个能够提供容错机制的组件来保障系统的可用性。
Hystrix:
Hystrix 是 Netflix 提供的一个用于处理分布式系统的延迟和故障的库。它实现了断路器模式,可以在服务之间进行通信时提供容错和隔离机制。
Hystrix 可以通过定义 fallback 方法来处理调用失败时的情况,使得系统在发生故障时能够进行优雅降级,而不至于影响整个系统的稳定性。
Hystrix 可以与 Feign 集成,通过 FeignClient 的 fallback 属性来指定 Hys ...
SpringMVC
SpringMVCRESTfulRESTful 风格是一种设计风格,用于构建网络服务(Web Services),特别是在使用 HTTP 协议作为通信协议时。它遵循一组约定和原则,使得网络服务具有可伸缩性、可维护性、可扩展性以及性能良好的特性。
以下是 RESTful 风格的一些主要特点和原则:
基于资源(Resource-Based):RESTful 风格中的核心概念是资源(Resource),每个资源都有一个唯一的标识符(URI)来表示。客户端通过对资源的标识符进行操作来与资源进行交互,而不是直接对操作进行命名。
统一接口(Uniform Interface):RESTful 风格使用统一的接口对资源进行操作。这包括使用 HTTP 动词(GET、POST、PUT、DELETE 等)对资源进行 CRUD 操作,以及使用标准的 HTTP 状态码来表示操作结果。
无状态(Stateless):RESTful 风格的服务应该是无状态的,即服务端不会保存客户端的状态信息。每个请求应该包含足够的信息来完成该请求,服务端不会保存任何客户端的状态。
资源关系(Resource Relati ...
JpaStudy
当你在使用 Spring Data JPA 时,通常会定义一个接口并继承 JpaRepository 接口。这个过程并不是直接的Java接口继承,而是利用了 Spring Data JPA 提供的接口继承机制来简化数据访问层的开发。
JpaRepository 接口是 Spring Data JPA 提供的一个标准接口,它提供了一组用于对数据库进行常见操作(如保存、更新、删除、查询等)的方法。这些方法在定义时不需要编写具体的实现,Spring Data JPA 会根据方法的命名规则自动为其生成实现。
当你定义一个接口并继承 JpaRepository 时,Spring Data JPA 会动态地为这个接口生成对应的数据访问方法。这些方法可以直接在你的业务逻辑中使用,而无需手动编写数据访问层的实现代码。
例如,假设你有一个名为 User 的实体类,你可以定义一个继承自 JpaRepository<User, Long> 的接口:
123456import org.springframework.data.jpa.repository.JpaRepository;public ...
ProjectLearning2
广告投放系统
类CommonResponseAdvice将字段进行包装进行填充,规范化API返回格式:通过统一响应,可以定义API的返回格式,包括状态码、消息、数据等内容,使得不同的接口返回风格一致,提高了接口的可预测性和可读性。
JpaRepository的继承过程关于JpaRepository的继承过程
Feign和Hystrix关于Feign和Hystrix的整合,可以参考以下文章:如何理解服务调用,阶段器和负载均衡
RESTful有关RESTful的介绍,可以参考以下文章:浅谈restful
注解
@Transactional,声明一个方法需要进行事务管理,并指定事务的隔离级别、传播行为和超时时间等属性。
思想
接口可以继承自什么?接口可以继承自接口,但不能继承自类。这意味着一个接口可以通过使用关键字 extends 来扩展(继承)另一个接口。通过接口继承,子接口可以获得父接口中声明的方法签名,但不包括方法的实现。
binlogbinlog原理
主库将数据库中的数据的变化写入到binlog日志文件中2 从库通过连接主库
从库会创建一个i/o线程,用于 ...