hulu 实习 后端
这个面试很早了,在22年4/5月份~~
hulu
hulu一面
- 时间:75分钟
- 自我介绍+基础+算法+反问
- 按照简历面的,然后写了俩算法(英文出题)
- 介绍一下Map,hashmap的底层原理,线程安全问题
- 如何创建一个线程安全的map
- synchronized和volatile,各自的原理,区别
- JVM的内存模型
- 类加载过程
- 垃圾回收,如何定义垃圾,如何回收垃圾,垃圾回收的流程
- 数据库,索引的分类,索引的数据结构
- 删除/插入记录时,索引的B+树如何变化,注意考虑非聚集索引的B+树的变化
- 数据库的事务,特性,隔离级别及各自能解决的问题
- 什么是脏读,幻读,不可重复读,分别用什么方法解决的
- MVCC是怎么做的
- 介绍一下数据库的锁
- 什么是死锁,怎么产生的,如何解决
算法题:
/* * Click `Run` to execute the snippet below! */ //A ransom note is a message that is created in an anonymous manner by cutting letters out of a physical magazine and pasting them on a note card. // For example, to create the note "Meet under the clocktower at noon", first a "M" is found in the magazine, cut out, then glued onto the note card. Then, a "e" is found in the magazine, cut out, then glued to the note card, etc, etc until the entire note has been constructed. // We would like to write a function that takes in 2 parameters and checks whether the note can be created from a given magazine. The function takes two parameters: // - magazine // - note // and returns true if the note can be created from the magazine, false otherwise. /* * To execute Java, please define "static void main" on a class * named Solution. * * If you need more classes, simply define them inline. */ // ---------------------------------------------------------- /* * Write a method that will return true if a string input can be composed * entirely of the 1-2 letter symbols of elements in the periodic table. * Set of all possible element symbols is given as 'elements'. * Ignore capitalization * * for example: * 'bacon': * 'b' 'ac' 'o' 'n' * 'ba' 'c' 'o' 'n' * 'ba' 'co' 'n' * * other examples: * 'banana' = true * 'fragrant' = false */
hulu二面
- 时间:80分钟
- 自我介绍+一点点项目+算法+反问
- 介绍一下Spring的IOC和AOP
- 项目中哪里用到了AOP
算法题:
热身题:链表重排(*****)
给定一个正整数数组,删除其中的k-1个元素,将数组分成k个子区间,问是否存在一种划分使得k个子区间的和相等。
class Solution { public Boolean can_split_nums_equals(int[] nums, int k) { } }
hulu三面
- leader面,问了问设计题,然后类似于hr面的一些问题,最后英文问了个问题