注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
分享一下前一段时间亚麻内部转组的面经,希望对大家有所帮助,同时还是求点大米以后看面经包裹,谢谢
1. 4个人面试,分两天
- 用定义好的iterator interface (有<E> next() 和boolean hasNext() method), 来实现一个新的类, 要求有 <E> next(), boolean hasNext(), 和 <E> peekNext() method. 写的磕磕绊绊的,在提示下写出来了,generics用的不熟,犯了很傻的错误。第二题是给一个字符串,返回所有只含有一种字符的子字符串的个数,例如aab, 返回4,因为a,a,aa,b,这个直接写出来了
- find union of two sorted interger arrays, 一开始想错了,写成了find intersection of two sorted array, 后来写出来了,修修改改的,写的比较丑陋
- 经典问题,reconstruct binary tree with post and in oup是给定一个integer matrix, 求 max length of an increasing path, each number can be used only once in one path。 这个题目可以看作是一维数组中最长递增子数组的二维扩展,一开始我给的思路就是还用DFS然后每个点跑一遍,面试官提示了以后用dp矩阵记录已经visit过的格点,最后题目做出来了,稍微修改了一下function signature 和代码结构
- 结果,第二个面试官帮忙争取,给了offer
|